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
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
You're correct, my mistake.
Now I unwrapped this drill-specific class and converted the
*LogicalAggregate* to *JdbcAggregate* my self. But the unparsed SQL is
still using a subquery.
Drill seems to use a custom build of Calcite v.1.4. The difference between
the *implement* method of JdbcAggregate