You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/15 05:34:49 UTC

[GitHub] [flink] dianfu commented on a diff in pull request #19958: [FLINK-27159][table-api] Support first_value/last_value in the Table API

dianfu commented on code in PR #19958:
URL: https://github.com/apache/flink/pull/19958#discussion_r897546979


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -410,6 +410,20 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
                     .outputTypeStrategy(TypeStrategies.aggArg0(t -> t, true))
                     .build();
 
+    public static final BuiltInFunctionDefinition FIRST_VALUE =

Review Comment:
   Add last_value/first_value methods in BaseExpressions and also in PyFlink?



##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/AggregateITCase.scala:
##########
@@ -114,6 +114,34 @@ class AggregateITCase(mode: StateBackendMode) extends StreamingWithStateTestBase
     assertEquals(expected.sorted, sink.getRetractResults.sorted)
   }
 
+  @Test
+  def testFirstLastValue(): Unit = {

Review Comment:
   Could we integrate it into existing test case, e.g. testGroupAggregateWithExpression, etc. Then we could avoid introducing another it 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