You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Feng Zhu <we...@gmail.com> on 2019/12/31 08:07:03 UTC

[DISCUSSION] Wrong GROUP_ID function

Recently, we encounter a problem caused by some inconsistency query results.
After some investigations, I find the GROUP_ID()'s implementation in
Calcite is wrong [1].

However, if we want to fix it, another field is required to be added into
*Aggregate*, bringing huge impacts on almost every phases.

Therefore, can we just remove it?
On one hand, "not support" message is better than "wrong result". On the
other hand, GROUP_ID() is not in the SQL standard. The oracle function is
rarely used.

[1] https://issues.apache.org/jira/browse/CALCITE-1824

Best,
Feng

Re: [DISCUSSION] Wrong GROUP_ID function

Posted by Julian Hyde <jh...@apache.org>.
In the JIRA case, I’ve proposed a rewrite that I think would allow us to implement GROUP_ID without any changes to Aggregate.

> On Dec 31, 2019, at 12:07 AM, Feng Zhu <we...@gmail.com> wrote:
> 
> Recently, we encounter a problem caused by some inconsistency query results.
> After some investigations, I find the GROUP_ID()'s implementation in
> Calcite is wrong [1].
> 
> However, if we want to fix it, another field is required to be added into
> *Aggregate*, bringing huge impacts on almost every phases.
> 
> Therefore, can we just remove it?
> On one hand, "not support" message is better than "wrong result". On the
> other hand, GROUP_ID() is not in the SQL standard. The oracle function is
> rarely used.
> 
> [1] https://issues.apache.org/jira/browse/CALCITE-1824
> 
> Best,
> Feng