You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "kakasi2046@163.com" <ka...@163.com> on 2019/04/02 03:30:20 UTC

About aggregation problem

hello,

The problem is about use [count(distinct(ID))],distinct aggregation notsupported. Does the community  have a plan  to solve the problem,or have a temporary solution ?


thank you

Re: About aggregation problem

Posted by wmy7ymw <wm...@gmail.com>.
This snippet works for me:

@Test
public void pg() throws SqlParseException {
  String sql = "select count(distinct a_column) from some_table";
  SqlParser.create(sql).parseQuery();
}


On Mon, Apr 1, 2019 at 8:30 PM kakasi2046@163.com <ka...@163.com>
wrote:

> hello,
>
> The problem is about use [count(distinct(ID))],distinct aggregation
> notsupported. Does the community  have a plan  to solve the problem,or have
> a temporary solution ?
>
>
> thank you

Re: About aggregation problem

Posted by Chunwei Lei <ch...@gmail.com>.
Aggregate with distinct is always supported. You can find many
examples in SqlToRelConverterTest.



Bests,
Chunwei

kakasi2046@163.com <ka...@163.com> 于2019年4月2日周二 上午11:31写道:
>
> hello,
>
> The problem is about use [count(distinct(ID))],distinct aggregation notsupported. Does the community  have a plan  to solve the problem,or have a temporary solution ?
>
>
> thank you

Re: About aggregation problem

Posted by Yuzhao Chen <yu...@gmail.com>.
Select count(distinct f0) from t
Is supported now, can you please past your error stack trace, is it the parse error or plan promotion error ?

Best,
Danny Chan
在 2019年4月2日 +0800 AM11:31,kakasi2046@163.com <ka...@163.com>,写道:
> hello,
>
> The problem is about use [count(distinct(ID))],distinct aggregation notsupported. Does the community have a plan to solve the problem,or have a temporary solution ?
>
>
> thank you