Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21976 )

Change subject: IMPALA-13481: Add support for various agg and analytic functions
......................................................................


Patch Set 13:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21976/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/RewriteRexOverRule.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/RewriteRexOverRule.java:

http://gerrit.cloudera.org:8080/#/c/21976/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/RewriteRexOverRule.java@121
PS12, Line 121:      *    = Rank/Count
              :      * where,
              :      *  Rank = rank() over([partition by clause] order by 
clause)
              :      *  Count = count() over([partition by clause])
> Ok, I made this change and also changed the formula in the test file and it
Sorry, I was wrong. We don't have tests for this, but this is wrong when there 
are duplicate values. I will file a JIRA for adding a test case that exercises 
this.

Basically, if I have a sequence:
1, 1, 3
The cume_dist should be:
0.6666, 0.6666, 1.0

Rank / count would be
0.3333, 0.3333, 1.0



--
To view, visit http://gerrit.cloudera.org:8080/21976
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I57c69a60c63872b2964688f395b662a85698555e
Gerrit-Change-Number: 21976
Gerrit-PatchSet: 13
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Wed, 22 Jan 2025 23:00:55 +0000
Gerrit-HasComments: Yes

Reply via email to