Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-40540][SQL] Migrate compilation errors onto error classes: _LEGACY_ERROR_TEMP_1200-1299 #38027

Closed

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Sep 28, 2022

What changes were proposed in this pull request?

In the PR, I propose to migrate 100 compilation errors onto temporary error classes with the prefix _LEGACY_ERROR_TEMP_12xx. The error message will not include the error classes, so, in this way we will preserve the existing behaviour.

Why are the changes needed?

The migration on temporary error classes allows to gather statistics about errors and detect most popular error classes. After that we could prioritise the work on migration.

The new error class name prefix _LEGACY_ERROR_TEMP_ proposed here kind of marks the error as developer-facing, not user-facing. Developers can still get the error class programmatically via the SparkThrowable interface, so that they can build error infra with it. End users won't see the error class in the message. This allows us to do the error migration very quickly, and we can refine the error classes and mark them as user-facing later (naming them properly, adding tests, etc.).

Does this PR introduce any user-facing change?

No. The error messages should be almost the same by default.

How was this patch tested?

By running the modified test suites:

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

@MaxGekk
Copy link
Member Author

MaxGekk commented Sep 29, 2022

@itholic @srielau @cloud-fan @anchovYu Please, review this PR.

@MaxGekk MaxGekk marked this pull request as ready for review September 29, 2022 09:03
@MaxGekk MaxGekk changed the title [WIP][SPARK-40540][SQL] Migrate compilation errors onto error classes: _LEGACY_ERROR_TEMP_1200-1299 [SPARK-40540][SQL] Migrate compilation errors onto error classes: _LEGACY_ERROR_TEMP_1200-1299 Sep 29, 2022
@MaxGekk
Copy link
Member Author

MaxGekk commented Sep 29, 2022

@HyukjinKwon Could you approve the PR, please.

@MaxGekk
Copy link
Member Author

MaxGekk commented Sep 30, 2022

Merging to master. Thank you, @gatorsmile.

@MaxGekk MaxGekk closed this in 43a6b93 Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants