Please answer these questions before submitting your issue. Thanks!
- What did you do?
cat having.sql|./soar.darwin-amd64 -rewrite-rules having -report-type rewrite
select * from x where count(1) > 2 group by t
cat having.sql
select * from x group by t having count(1)>2
- What did you expect to see?
cat having.sql|./soar.darwin-amd64 -rewrite-rules having -report-type rewrite
select * from x group by t having count(1)>2
- What did you see instead?
select * from x where count(1) > 2 group by t
- What version of are you using (
soar -version)?
Version: 2018-10-29 22:39:22 +0800 @153c0c5
Branch: master
Compile: 2018-10-29 22:40:24 +0800 by go version go1.10.4 linux/amd64
GitDirty: 0
修复建议:
在having的rewrite组件,加入对聚合函数的检查,如果发现是聚合函数的条件,不做这个转化
Please answer these questions before submitting your issue. Thanks!
soar -version)?Version: 2018-10-29 22:39:22 +0800 @153c0c5
Branch: master
Compile: 2018-10-29 22:40:24 +0800 by go version go1.10.4 linux/amd64
GitDirty: 0
修复建议:
在having的rewrite组件,加入对聚合函数的检查,如果发现是聚合函数的条件,不做这个转化