[ 
https://issues.apache.org/jira/browse/CALCITE-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741317#comment-14741317
 ] 

Julian Hyde commented on CALCITE-883:
-------------------------------------

Sounds reasonable. I would add a 'boolean ignoreNulls' field to SqlAggFunction. 
Then SqlStdOperatorTable would have LEAD_IGNORE_NULLS in addition to LEAD, and 
so forth.

Patch would require changes to parser, SqlParserTest, validator and validator 
test (to make sure that IGNORE NULLS is only specify for aggregate functions 
that support it), winagg.oq, and reference.md.

In the parser, I suggest you call this "null treatment", to be consistent with 
the SQL standard.

> RESPECT NULLS, IGNORE NULLS option for LEAD, LAG 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: Sean Hsuan-Yi Chu
>
> 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
(v6.3.4#6332)

Reply via email to