Column missing from COUNT(column)

2017-02-02 Thread Eli Levine
Greetings! I have encountered what appears to be a bug in Calcite while working on the Pig adapter [1]. This query: select deptno + 4, sum(sal), sum(3 + sal), 2 * count(sal) from emp group by deptno produces the following plan: LogicalProject(EXPR$0=[+($0, 4)], EXPR$1=[$1], EXPR$2=[$2],

Re: Column missing from COUNT(column)

2017-02-02 Thread Gautam Parai
The same query on Drill executes correctly. Hence, the logical plan should be correct. Maybe the COUNT(sal) converted to COUNT(*) because sal is NOT NULL. From: Eli Levine Sent: Thursday, February 2, 2017 2:29:06 PM To:

[jira] [Created] (CALCITE-1617) Druid adapter: Send timestamp literals to Druid as local time, not UTC

2017-02-02 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1617: Summary: Druid adapter: Send timestamp literals to Druid as local time, not UTC Key: CALCITE-1617 URL: https://issues.apache.org/jira/browse/CALCITE-1617 Project:

Re: Column missing from COUNT(column)

2017-02-02 Thread Eli Levine
It was indeed a case of Calcite optimizing COUNT of NOT NULL columns. Thanks for the pointers, Gian and Gautam! On Thu, Feb 2, 2017 at 2:53 PM, Gautam Parai wrote: > The same query on Drill executes correctly. Hence, the logical plan should > be correct. Maybe the COUNT(sal)

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].