LucaCappelletti94 opened a new pull request, #2680: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2680
Stacked on the `IN` refactor PR. In SQLite "the right-hand side of an IN or NOT IN operator can be a table name or table-valued function name in which case the right-hand side is understood to be a subquery of the form `(SELECT * FROM name)`" (https://www.sqlite.org/lang_expr.html#in_op). SQLite 3.51.1 runs `SELECT 1 IN t`, `SELECT 1 NOT IN t` and `SELECT 1 IN main.t`, but the SQLite dialect failed with `Expected: (, found: t`. `InTarget` gains a `Table { name, args }` variant, and a new dialect method, `supports_in_table_expression`, enables it for SQLite and the generic dialect. It does not apply to ClickHouse's `GLOBAL IN`. Tests round-trip plain, qualified and function forms with and without `NOT`, check the parsed name and arguments, and check that parenthesized lists and subqueries still parse as before. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
