Skip to content

Conversation

@mihailoale-db
Copy link
Contributor

What changes were proposed in this pull request?

I propose that we disallow SortOrder expressions under non-Sort operators.

Why are the changes needed?

Following Dataframe program throw an internal error:

val df = sql("SELECT 1 AS name")
df.select(desc("name"))

In this PR we fix is so we throw a more user friendly one.

Does this PR introduce any user-facing change?

Different (more user friendly) error is thrown.

How was this patch tested?

Added test.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Apr 14, 2025
@mihailoale-db
Copy link
Contributor Author

@cloud-fan should we do it like this or should we move checkExpressionUnderUnsupportedOperator check to the begging of the operator match? Thanks

@mihailoale-db mihailoale-db force-pushed the mihailoale-db/sortordercheck branch 2 times, most recently from dd8d02f to 5ab8227 Compare April 14, 2025 22:32
@mihailoale-db mihailoale-db force-pushed the mihailoale-db/sortordercheck branch from 5ab8227 to 2bb8519 Compare April 14, 2025 23:08
@cloud-fan
Copy link
Contributor

cloud-fan commented Apr 15, 2025

there are cases that an expression containing SortOrder (e.g. ListAgg) can appear in non-sort operators. We need to find out all these cases.

@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jul 25, 2025
@github-actions github-actions bot closed this Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants