You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pipe syntax: |> SELECT DISTINCT is misparsed and |> DISTINCT is not supported #3041
|> SELECT DISTINCT is misparsed, and the |> DISTINCT operator is not parsed. BigQuery supports both (pipe syntax): the SELECT operator "supports standard output modifiers like SELECT AS STRUCT and SELECT DISTINCT", and |> DISTINCT is "similar to using a |> SELECT DISTINCT * clause".
|> SELECT DISTINCT
PipeOperator::Select has no distinct field, and the parser reads DISTINCT as a column name. |> SELECT DISTINCT k becomes a select item distinct AS k. In DataFusion:
returns two rows, 1 and 1, under a column named k: no deduplication, and k is an alias rather than a column. Without a column named distinct, the query fails with No field named distinct.
Expected: PipeOperator::Select carries an Option<Distinct> (as Select::distinct does), parsed the same way as in a standard SELECT.
|> DISTINCT
SELECT*FROM t |> DISTINCT
fails with Expected: one of SELECT or EXTEND or SET .... Expected: a PipeOperator::Distinct variant.
Seen on 0.63.0 and on main (parse_pipe_operators in src/parser/mod.rs). Follow-up to #1758; the DataFusion side is apache/datafusion#14660.
Activity