pypika icon indicating copy to clipboard operation
pypika copied to clipboard

Accept `Table` as argument to `isin`

Open martijnthe opened this issue 11 months ago • 0 comments

ClickHouse supports using a table identifier directly with IN.

For example, this is a valid ClickHouse query:

WITH y AS
    (
        SELECT n
        FROM values('n int', 1, 2)
    )
SELECT *
FROM values('n int', 1, 2, 3, 4) AS x
WHERE x.n IN y

It would be nice if pypika's isin would accept a Table as well, but currently it only accepts list | tuple | set | Term.

I realize this syntax is ClickHouse specific and not standard SQL. I'm not sure whether that's a requirement for this library's API.

martijnthe avatar Mar 20 '24 14:03 martijnthe