jayzhan211 commented on PR #24964: URL: https://github.com/apache/datafusion/pull/24964#issuecomment-5994619465
This test only passes because `l` sorts before `r`. `exclude_using_columns` keeps the `USING` key whose qualifier sorts first. With `x`/`a` aliases, `SELECT *` emits `a.grp`, which is NULL for unmatched left rows and lands in column 3, while `SELECT grp` still returns `x.grp`. The deleted Rust assertion (`t`/`p` → `["ts", "trade_id", "symbol", ...]`) was the only test for that case, so please keep it here: ```diff -# SELECT * exposes the USING key once. +# SELECT * exposes the USING key once, keeping the key whose qualifier sorts +# first (`l` < `r` keeps the left key). ``` ```sql # With the right alias sorting first, SELECT * keeps the right key, which is # NULL for unmatched left rows. query IPTPT SELECT * FROM asof_left x ASOF JOIN asof_right a MATCH_CONDITION (x.ts >= a.ts) USING (grp) WHERE x.id IN (1, 2) ORDER BY x.id; ---- 1 2024-01-01T09:00:01 NULL NULL NULL 2 2024-01-01T09:00:04 A 2024-01-01T09:00:04 a4 ``` -- 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]
