[
https://issues.apache.org/jira/browse/CALCITE-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800895#comment-16800895
]
Hongze Zhang commented on CALCITE-883:
--------------------------------------
Hi [~Chunwei Lei], I've made a draft work at
https://github.com/zhztheplayer/calcite/commit/39b1784f37f9ef30cefb3bcae9642a5a10f685f4.
Could you please check if it is a feasible direction to solve the problem?
Thank you very much.
The null treatment operator is added. And with some extra changes I see the
case SqlToRelConverter#testOverNullTreatmentWindow has passed. Therefore I
think it is possible to use an operator without much changes to parse tree
level.
Besides, I have temporarily remove the validator changes as I suggest to place
the validation part to SqlAggFunction[1] and
SqlValidatorImpl#validateAggregateParams[2] (But not have enough time to finish
this yet).
Please feel free to cheery pick if you think the changes could possibly help
with your further work.
[1]
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlAggFunction.java
[2]
https://github.com/apache/calcite/blob/06b1894db15dd299590c5056a17f87bac9183eb1/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L5192
> Support RESPECT NULLS, IGNORE NULLS option for LEAD, LAG, FIRST_VALUE,
> LAST_VALUE window functions
> --------------------------------------------------------------------------------------------------
>
> Key: CALCITE-883
> URL: https://issues.apache.org/jira/browse/CALCITE-883
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Sean Hsuan-Yi Chu
> Assignee: Chunwei Lei
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> This issue was brought up in Drill community:
> (https://issues.apache.org/jira/browse/DRILL-3597)
> For convenience, I copied and pasted the reporter Khurram Faraaz's
> description here:
> "The SQL standard defines a RESPECT NULLS or IGNORE NULLS option for lead,
> lag, first_value, and last_value window functions."
> In Calcite, we should have been able to recognized this option.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)