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/05/27 11:44:43 UTC

[GitHub] [flink] xuyangzhong commented on a diff in pull request #19797: [FLINK-27741][table-planner] Fix NPE when use dense_rank() and rank()…

xuyangzhong commented on code in PR #19797:
URL: https://github.com/apache/flink/pull/19797#discussion_r883538277


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/OverAggregateITCase.scala:
##########
@@ -159,6 +159,66 @@ class OverAggregateITCase(mode: StateBackendMode) extends StreamingWithStateTest
     assertEquals(expected.sorted, sink.getAppendResults.sorted)
   }
 
+  @Test
+  def testDenseRankOnOver(): Unit = {

Review Comment:
   Maybe you can add some test cases for testing plan, not only just for ITCases.



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/RankLikeAggFunctionBase.java:
##########
@@ -98,7 +98,7 @@ protected Expression orderKeyEqualsExpression() {
                             equalTo(lasValue, operand(i)));
         }
         Optional<Expression> ret = Arrays.stream(orderKeyEquals).reduce(ExpressionBuilder::and);
-        return ret.orElseGet(() -> literal(true));
+        return ret.orElseGet(() -> literal(false));

Review Comment:
   Hi, I just wander why this value should be changed ? 



-- 
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