How to pushdown aggregates to JDBC datasources

2017-06-01 Thread Muhammad Gelbana
​​ The following query *SELECT COUNT(**CNTRn**) FROM incorta.SLS.CNTR* Is translated to the following *SELECT COUNT("**CNTRn**") AS "EXPR$0"* *FROM (SELECT "**CNTRn**" FROM "**SLS**"."**CNTR**") AS "t"* But I want to pushdown the whole aggregation so the output query would be *SELECT COUNT("**CNT

Re: How to pushdown aggregates to JDBC datasources

2017-06-01 Thread Julian Hyde
There is already a rule that does this: JdbcRules.JdbcAggregateRule. I don’t know what DrillCalciteSqlAggFunctionWrapper is; it seems Drill-specific. > On Jun 1, 2017, at 4:20 AM, Muhammad Gelbana wrote: > > ​​ > The following query > *SELECT COUNT(**CNTRn**) FROM incorta.SLS.CNTR* > > Is tran

Fetch size and offset support

2017-06-01 Thread Muhammad Gelbana
This line says that offset and fetch isn't supported while this issue suggests otherwise. How is this possible ? In my case,

Re: Fetch size and offset support

2017-06-01 Thread Julian Hyde
We’d love if JdbcSort could handle fetch and offset (and generate appropriate SQL for its target dialect). In fact we have a JIRA case already: https://issues.apache.org/jira/browse/CALCITE-1265 > On Jun 1, 2017, at 8:33 AM, Muhammad Gelbana

[jira] [Created] (CALCITE-1820) Push more filters down to Druid

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1820: Summary: Push more filters down to Druid Key: CALCITE-1820 URL: https://issues.apache.org/jira/browse/CALCITE-1820 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-1821) Support typed columns in Druid

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1821: Summary: Support typed columns in Druid Key: CALCITE-1821 URL: https://issues.apache.org/jira/browse/CALCITE-1821 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-1822) Push Aggregate that follows Aggregate down to Druid

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1822: Summary: Push Aggregate that follows Aggregate down to Druid Key: CALCITE-1822 URL: https://issues.apache.org/jira/browse/CALCITE-1822 Project: Calcite Issue

[jira] [Created] (CALCITE-1823) Push join down to Druid, using Druid's query-time lookups

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1823: Summary: Push join down to Druid, using Druid's query-time lookups Key: CALCITE-1823 URL: https://issues.apache.org/jira/browse/CALCITE-1823 Project: Calcite

[jira] [Created] (CALCITE-1824) GROUP_ID returns wrong result

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1824: Summary: GROUP_ID returns wrong result Key: CALCITE-1824 URL: https://issues.apache.org/jira/browse/CALCITE-1824 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-1825) Rule to split a Project into expressions that can and cannot be pushed into Druid

2017-06-01 Thread Julian Hyde (JIRA)
Julian Hyde created CALCITE-1825: Summary: Rule to split a Project into expressions that can and cannot be pushed into Druid Key: CALCITE-1825 URL: https://issues.apache.org/jira/browse/CALCITE-1825 P