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

SQL查询语句报错 #351

Closed
voidwings opened this issue Sep 6, 2024 · 7 comments
Closed

SQL查询语句报错 #351

voidwings opened this issue Sep 6, 2024 · 7 comments

Comments

@voidwings
Copy link

voidwings commented Sep 6, 2024

系统 Linux 22.04 LTS, SCQL 版本 0.8.1b1,在P2P模式下运行以下查询时报错。
./brokerctl run "SELECT ta.ID, ta.income FROM ta WHERE ta.income > (SELECT AVG(ta.income) AS avg_income FROM ta INNER JOIN tb ON ta.ID = tb.ID);" --project-id "demo" --host http://localhost:8081 --timeout 30

错误码:
image

日志:

271B3C95-DD9A-483A-C7C9-EA002195F52B

经测试,在mysql下可执行此查询。似乎是rewrite的时候出问题了?

@lanyy9527
Copy link

您好,SCQL版本是 0.8.1b1 吗?

@voidwings
Copy link
Author

您好,SCQL版本是 0.8.1b1 吗?

是0.8.1b1的,我打错了

@lanyy9527
Copy link

您好,经过我们测试后发现,目前确实是不支持该语法的,请问您这边的具体场景是怎样的呢?

@voidwings
Copy link
Author

我看SCQL实现进度里写的SELECT语句完全支持 WHERE子句,所以实际上是不支持子查询语法的吗?

@lanyy9527
Copy link

两个语句分开执行是OK的,可能目前对嵌套语句的支持还不完善

@tongke6
Copy link
Collaborator

tongke6 commented Sep 13, 2024

我看SCQL实现进度里写的SELECT语句完全支持 WHERE子句,所以实际上是不支持子查询语法的吗?

是的,子查询支持的不全。目前应该只支持 in 的 subquery

Copy link

Stale issue message. Please comment to remove stale tag. Otherwise this issue will be closed soon.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants