secretflow / scql

SCQL (Secure Collaborative Query Language) is a system that allows multiple distrusting parties to run joint analysis without revealing their private data.
https://www.secretflow.org.cn/docs/scql/en/
Apache License 2.0
126 stars 46 forks source link

SQL查询语句报错 #351

Closed voidwings closed 1 week ago

voidwings commented 1 month ago

系统 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 commented 1 month ago

您好,SCQL版本是 0.8.1b1 吗?

voidwings commented 1 month ago

您好,SCQL版本是 0.8.1b1 吗?

是0.8.1b1的,我打错了

lanyy9527 commented 1 month ago

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

voidwings commented 1 month ago

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

lanyy9527 commented 1 month ago

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

tongke6 commented 1 month ago

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

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

github-actions[bot] commented 2 weeks ago

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