Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Aug 29, 2022

What changes were proposed in this pull request?

In the PR, I propose to the following new error classes:

  • GROUP_BY_POS_OUT_OF_RANGE
  • GROUP_BY_POS_REFERS_AGG_EXPR

and migrate 2 compilation exceptions related to GROUP BY a position onto them.

Why are the changes needed?

The migration onto error classes makes the errors searchable in docs, and allows to edit error's text messages w/o modifying the source code.

Does this PR introduce any user-facing change?

Yes, in some sense because it modifies user-facing error messages.

How was this patch tested?

By running the affected test suites:

$ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"
$ build/sbt "core/testOnly *SparkThrowableSuite"

@MaxGekk MaxGekk changed the title [WIP][SQL] Use error classes in the compilation errors of GROUP BY a position [WIP][SPARK-40260][SQL] Use error classes in the compilation errors of GROUP BY a position Aug 30, 2022
@MaxGekk MaxGekk changed the title [WIP][SPARK-40260][SQL] Use error classes in the compilation errors of GROUP BY a position [SPARK-40260][SQL] Use error classes in the compilation errors of GROUP BY a position Aug 30, 2022
@MaxGekk MaxGekk marked this pull request as ready for review August 30, 2022 06:26
@MaxGekk
Copy link
Member Author

MaxGekk commented Aug 30, 2022

cc @srielau @anchovYu

Copy link
Contributor

@srielau srielau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit on the wording, LGTM otherwise

@MaxGekk
Copy link
Member Author

MaxGekk commented Aug 30, 2022

Merging to master. Thank you, @srielau @cloud-fan for review.

@MaxGekk MaxGekk closed this in 296fe49 Aug 30, 2022
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.

3 participants