RE: Null literals in AggregateReduceFunctionsRule

2017-02-07 Thread Anton Mushin
AM To: dev@calcite.apache.org Cc: Timo Walther <twal...@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.getSqlTy

Re: Null literals in AggregateReduceFunctionsRule

2017-02-06 Thread Julian Hyde
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

Null literals in AggregateReduceFunctionsRule

2017-02-02 Thread Anton Mushin
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].