Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAR对于having语句的rewrite处理聚合函数存在问题 #63

Open
llzx373 opened this issue Oct 30, 2018 · 0 comments
Open

SOAR对于having语句的rewrite处理聚合函数存在问题 #63

llzx373 opened this issue Oct 30, 2018 · 0 comments
Labels

Comments

@llzx373
Copy link

llzx373 commented Oct 30, 2018

Please answer these questions before submitting your issue. Thanks!

  1. 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
  1. 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
  1. What did you see instead?
select * from x where count(1) > 2 group by t
  1. 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组件,加入对聚合函数的检查,如果发现是聚合函数的条件,不做这个转化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants