You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "liyang1206 (via GitHub)" <gi...@apache.org> on 2025/08/12 01:40:43 UTC
[PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
liyang1206 opened a new pull request, #26892:
URL: https://github.com/apache/flink/pull/26892
## What is the purpose of the change
Implementing [FLINK-36377](https://issues.apache.org/jira/browse/FLINK-36377) for supporting ROW, ARRAY, MAP, and RAW types for LAST_VALUE aggregate function.
## Brief change log
- Modify the AggFunctionFactory to ensure that the creation of the LAST_VALUE function supports ROW, ARRAY, MAP, and RAW types.
- Modify the LastValueAggFunction and LastValueWithRetractAggFunction to support copying of complex data type arguments and remove the original handling of StringData
## Verifying this change
This change added tests and can be verified as follows:
- Added test in AggregateITCase to validate ROW, MAP, ARRAY in LAST_VALUE
- Added unit test for applying LAST_VALUE for ROW in LastValueAggFunctionWithOrderTest, LastValueAggFunctionWithoutOrderTest, LastValueWithRetractAggFunctionWithOrderTest and LastValueWithRetractAggFunctionWithoutOrderTest
- Added unit test for applying LAST_VALUE for ROW and ARRAY in GroupAggregateHarnessTest
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): yes
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? docs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26892:
URL: https://github.com/apache/flink/pull/26892#issuecomment-4637808520
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26892:
URL: https://github.com/apache/flink/pull/26892#issuecomment-3177417752
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "d8f7d8259636b4aa1fb9ad3b1b3a757656624f1f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "d8f7d8259636b4aa1fb9ad3b1b3a757656624f1f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d8f7d8259636b4aa1fb9ad3b1b3a757656624f1f UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #26892:
URL: https://github.com/apache/flink/pull/26892#issuecomment-3195896864
@liyang1206 thank you for the contribution
can you please clarify why do we need serializer changes
and what do you mean by this
> Implementing [FLINK-36377](https://issues.apache.org/jira/browse/FLINK-36377) for supporting ROW, ARRAY, MAP, and RAW types for LAST_VALUE aggregate function.
I locally reverted all the non-test changes from this PR and all the tests continue passing...
can you please clarify if there is any non-working case?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26892:
URL: https://github.com/apache/flink/pull/26892#issuecomment-4395002189
This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26892:
URL: https://github.com/apache/flink/pull/26892#discussion_r2273504974
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/AggregateITCase.scala:
##########
@@ -2119,6 +2119,242 @@ class AggregateITCase(
tEnv.dropTemporarySystemFunction("PERCENTILE")
}
+
+ @TestTemplate
+ def testLastValueInSeparatedRow(): Unit = {
+ val empsData = List(
+ (
+ 100L,
+ "Fred",
+ 10,
+ null,
+ null,
+ 40L,
+ 25,
+ true,
+ false,
+ ("extra1", 1),
+ Array("item1", "item2"),
+ Map("key1" -> "value1")),
+ (
+ 100L,
+ "Eric",
+ 20,
+ "M",
+ "San Francisco",
+ 3L,
+ 80,
+ null,
+ false,
+ ("extra2", 2),
+ Array("item3", "item4"),
+ Map("key2" -> "value2")),
+ (
+ 120L,
+ "John",
+ 40,
+ "M",
+ "Vancouver",
+ 2L,
+ null,
+ false,
+ true,
+ ("extra3", 3),
+ Array("item5"),
+ Map("key3" -> "value3")),
+ (
+ 120L,
+ "Wilma",
+ 20,
+ "F",
+ null,
+ 1L,
+ 5,
+ null,
+ true,
+ ("extra4", 4),
+ Array("item6"),
+ Map("key4" -> "value4")),
+ (
+ 120L,
+ "Alice",
+ 40,
+ "F",
+ "Vancouver",
+ 2L,
+ null,
+ false,
+ true,
+ ("extra5", 5),
+ Array("item7", "item8"),
+ Map("key5" -> "value5"))
+ )
+
+ val t = failingDataSource(empsData)
+ .toTable(
+ tEnv,
+ 'empno,
+ 'name,
+ 'deptno,
+ 'gender,
+ 'city,
+ 'empid,
+ 'age,
+ 'slacker,
+ 'manager,
+ 'extra_row,
Review Comment:
I wonder if we can test deeper nesting under the row including a row with arrays of rows of maps. Also if Variants and structured data types can be nested we should include them in the test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #26892: [FLINK-36377] [table-planner] Add LAST_VALUE support for ROW, ARRAY, MAP, and RAW types
URL: https://github.com/apache/flink/pull/26892
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org