calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Mushin <Anton_Mus...@epam.com>
Subject RE: Null literals in AggregateReduceFunctionsRule
Date Tue, 07 Feb 2017 09:21:23 GMT
Thanks Julian for your reply!

I created jira case[1] and I will try submit a pull request in near future.

[1] https://issues.apache.org/jira/browse/CALCITE-1621

Regards,
Anton Mushin

-----Original Message-----
From: Julian Hyde [mailto:jhyde@apache.org] 
Sent: Tuesday, February 07, 2017 5:05 AM
To: dev@calcite.apache.org
Cc: Timo Walther <twalthr@apache.org>
Subject: Re: Null literals in AggregateReduceFunctionsRule

Adding a cast around the null literal makes sense. I would use “rexBuilder.makeCast(type,
constantNull())” rather than “rexBuilder.makeNullLiteral(type.getSqlTypeName())” because
there’s a chance that the type needs precision & scale.

Can you please create a Calcite jira case and submit a pull request?

And by the way, I think I see similar patterns in AggregateExpandDistinctAggregatesRule, AggregateValuesRule
and even RexBuilder.makeOver.

Julian


> On Feb 2, 2017, at 12:57 AM, Anton Mushin <Anton_Mushin@epam.com> wrote:
> 
> Hello community,
> I have worked for support  standard deviation/variance functions in Flink SQL [1] and
I got exception " Type NULL is not supported. Null values must have a supported type.". 
> I started search root cause and found what problem come up from AggregateReduceFunctionsRule[2].
 @twalthr confirmed it after[3].
> 
> Now I have been used WA - the copy AggregateReduceFunctionsRule inside Flink with changes.
> Could we resolve the problem some way?
> I look forward to your reply.
> 
> [1] https://issues.apache.org/jira/browse/FLINK-4604#
> [2] 
> https://issues.apache.org/jira/browse/FLINK-4604?focusedCommentId=1561
> 5280&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabp
> anel#comment-15615280 [3] 
> https://issues.apache.org/jira/browse/FLINK-4604?focusedCommentId=1566
> 7697&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabp
> anel#comment-15667697
> 
> Regards,
> Anton Mushin
> 

Mime
View raw message