You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by 盛选义 <sh...@bytedance.com> on 2019/03/01 10:05:19 UTC

Sql转写问题咨询

您好,
   我用了jdbc的插件,目前发现了个问题,希望能帮忙看下。追查到是sql改写出现了问题。
原sql 为  select count(distinct(user_id)) from a ,但是转写后变成了 select distinct(user_id).
参见如图:
其中 distinct token 能看到是  select count(distinct user_id)
但是转写后的segments 中 没有了count。

注:a表没有参与分表。

Re: Sql转写问题咨询

Posted by "zhangliang@apache.org" <zh...@apache.org>.
Hello, for English only

------------------

Liang Zhang (John)
Apache ShardingSphere & Dubbo


盛选义 <sh...@bytedance.com> 于2019年3月1日周五 下午6:44写道:

> 您好,
>    我用了jdbc的插件,目前发现了个问题,希望能帮忙看下。追查到是sql改写出现了问题。
> 原sql 为  select count(distinct(user_id)) from a ,但是转写后变成了 select
> distinct(user_id).
> 参见如图:
> 其中 distinct token 能看到是  select count(distinct user_id)
> 但是转写后的segments 中 没有了count。
> 注:a表没有参与分表。
>