Skip to content

[SPARK-43413][SQL] Support QUALIFY clause#55074

Open
azmatsiddique wants to merge 11 commits intoapache:masterfrom
azmatsiddique:support-qualify-clause
Open

[SPARK-43413][SQL] Support QUALIFY clause#55074
azmatsiddique wants to merge 11 commits intoapache:masterfrom
azmatsiddique:support-qualify-clause

Conversation

@azmatsiddique
Copy link
Copy Markdown

What: Implements QUALIFY clause for filtering window functions in Spark SQL.
Why: Eliminates the need for subqueries when filtering by window results, bringing Spark SQL closer to parity with engines like BigQuery and Snowflake.
User-Facing: Adds the QUALIFY clause (and |> QUALIFY for pipe operators).
Testing: Added qualify.sql to SQLQueryTestSuite with full coverage of positive and negative cases.

…n last CSV column

### What changes were proposed in this pull request?
This PR fixes an issue where the CSV reader inconsistently parses empty quoted strings (`""`) when the `escape` option is set to an empty string (`""`). Previously, mid-line empty quoted strings correctly resolved to null/empty, but the last column resolved to a literal `"` character due to univocity parser behavior.

### Why are the changes needed?
To ensure consistent parsing of CSV data regardless of column position.

### Does this PR introduce _any_ user-facing change?
Yes, it fixes a bug where users were receiving incorrect data (a literal quote instead of an empty/null value) for the last column in a row under specific CSV configurations.

### How was this patch tested?
Added a new regression test in `CSVSuite` that verifies consistent parsing of both mid-line and end-of-line empty quoted fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant