4paradigm / OpenMLDB

OpenMLDB is an open-source machine learning database that provides a feature platform computing consistent features for training and inference.
https://openmldb.ai
Apache License 2.0
1.58k stars 317 forks source link

Add SQL syntax support for passing tuple to 'where in' statement #3689

Open tobegit3hub opened 8 months ago

tobegit3hub commented 8 months ago

Describe the feature you'd like

Now we can execute the sql like this.

select * from t1 where (gender) in (("male"));

But fail for this sql.

select * from t1 where (name, gender) in (("tobe", "male"));

Here is the error message.

W0104 11:03:18.722047 1311167296 sql_cluster_router.cc:2651] Status: [101] create logic plan tree failed--Unsupport ASTExpression StructConstructorWithParens
Error: [101] create logic plan tree failed--Unsupport ASTExpression StructConstructorWithParens
aceforeverd commented 8 months ago

There is no tuple but anonymous struct.

There is no big difference to concat_ws(",", name, gender) in ("tobe,male"). Support for struct is a huge work.