[CALCITE-7485] FIRST_VALUE/LAST_VALUE should only be defined for window aggregates#4919
[CALCITE-7485] FIRST_VALUE/LAST_VALUE should only be defined for window aggregates#4919xuzifu666 wants to merge 3 commits intoapache:mainfrom
Conversation
| ReturnTypes.ARG0, | ||
| OperandTypes.NUMERIC_UNIT_INTERVAL_NUMERIC_LITERAL) | ||
| .withFunctionType(SqlFunctionCategory.SYSTEM) | ||
| .withOver(true) |
There was a problem hiding this comment.
The previous code incorrectly marked BigQuery's PERCENTILE_DISC2 as requiresOver=true, but the test actually used its aggregate function, which naturally does not require OVER, so here changed it.
| ReturnTypes.DOUBLE, | ||
| OperandTypes.NUMERIC_UNIT_INTERVAL_NUMERIC_LITERAL) | ||
| .withFunctionType(SqlFunctionCategory.SYSTEM) | ||
| .withOver(true) |
There was a problem hiding this comment.
Also changed for BigQuery PERCENTILE_CONT2 function.
There was a problem hiding this comment.
This seems to be wrong according to https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/navigation_functions#percentile_cont
Maybe the test was incorrect
There was a problem hiding this comment.
Yes, you're right. The previous test was incorrect, which I've corrected. Thanks for pointing it out.
|
I've already modified the test; please help to review it again when you have time. Thank you! @mihaibudiu |
| SqlStdOperatorTable.ARG_MIN.withName("MIN_BY"); | ||
|
|
||
| /** The {@code PERCENTILE_CONT} function, BigQuery's | ||
| * equivalent to {@link SqlStdOperatorTable#PERCENTILE_CONT}, |
There was a problem hiding this comment.
Isn't this the same problem you fixed in commit 2?
There was a problem hiding this comment.
Yes, I forgot to fix the comment; it has been corrected.
|



jira: https://issues.apache.org/jira/browse/CALCITE-7485