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-47158][SQL] Assign proper name and sqlState to _LEGACY_ERROR_TEMP_(2134|2231) #45244

Closed
wants to merge 14 commits into from

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Feb 26, 2024

What changes were proposed in this pull request?

This PR proposes to assign proper name and sqlState to _LEGACY_ERROR_TEMP_(2134|2231)

  • _LEGACY_ERROR_TEMP_2134 -> CANNOT_PARSE_STRING_AS_DATATYPE
  • _LEGACY_ERROR_TEMP_2231 -> UNSUPPORTED_CALL.FIELD_INDEX

Why are the changes needed?

To improve error usability

Does this PR introduce any user-facing change?

No API changes, but the user-facing error message will be improved

How was this patch tested?

Added UTs.

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

No.

@github-actions github-actions bot added the SQL label Feb 26, 2024
@github-actions github-actions bot added the DOCS label Feb 26, 2024
@itholic itholic changed the title [WIP][SPARK-47158][SQL] Assign proper name and sqlState to _LEGACY_ERROR_TEMP_(2134|2231) [SPARK-47158][SQL] Assign proper name and sqlState to _LEGACY_ERROR_TEMP_(2134|2231) Feb 26, 2024
@itholic itholic marked this pull request as ready for review February 26, 2024 09:00
@itholic
Copy link
Contributor Author

itholic commented Feb 26, 2024

@MaxGekk Could you review this when you find some time? They are currently the most frequent top 2 legacy error classes.

@MaxGekk
Copy link
Member

MaxGekk commented Feb 26, 2024

@itholic Thanks for the ping. I will look at it soon.

@itholic
Copy link
Contributor Author

itholic commented Feb 27, 2024

Thanks, @MaxGekk for the review! Just adjusted comments

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

Waiting for CI. @itholic Could you update PR's description according to your recent changes.

@itholic
Copy link
Contributor Author

itholic commented Mar 1, 2024

Updated PR description and fixed the test.

@itholic
Copy link
Contributor Author

itholic commented Mar 1, 2024

Hmm... org.apache.spark.sql.catalyst.ShuffleSpecSuite and org.apache.spark.sql.connect.planner.SparkConnectProtoSuite keep failing, but I think they don't seem to be related to this change.

Oh, actually they are related. Let me fix it.

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

@itholic Could you fix the failed test:

[info] RowSuite:
...
[info] - SPARK-37654: row contains a null at the requested index should return null (1 millisecond)
[info] - access fieldIndex on Row without schema *** FAILED *** (4 milliseconds)
[info]   Map("methodName" -> "fieldIndex", "className" -> "Row", "fieldName" -> "`foo`") did not equal Map("methodName" -> "fieldIndex", "className" -> "Row", "fieldName" -> "foo") (SparkFunSuite.scala:362)

@MaxGekk
Copy link
Member

MaxGekk commented Mar 1, 2024

+1, LGTM. Merging to master.
Thank you, @itholic.

@MaxGekk MaxGekk closed this in e46d7d1 Mar 1, 2024
@itholic
Copy link
Contributor Author

itholic commented Mar 2, 2024

Thanks for the review, @MaxGekk !

TakawaAkirayo pushed a commit to TakawaAkirayo/spark that referenced this pull request Mar 4, 2024
…R_TEMP_(2134|2231)`

### What changes were proposed in this pull request?

This PR proposes to assign proper name and `sqlState` to `_LEGACY_ERROR_TEMP_(2134|2231)`

- `_LEGACY_ERROR_TEMP_2134` -> `CANNOT_PARSE_STRING_AS_DATATYPE`
- `_LEGACY_ERROR_TEMP_2231` -> `UNSUPPORTED_CALL.FIELD_INDEX`

### Why are the changes needed?

To improve error usability

### Does this PR introduce _any_ user-facing change?

No API changes, but the user-facing error message will be improved

### How was this patch tested?

Added UTs.

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

No.

Closes apache#45244 from itholic/TOP_LEGACY_ERRORS.

Authored-by: Haejoon Lee <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
ericm-db pushed a commit to ericm-db/spark that referenced this pull request Mar 5, 2024
…R_TEMP_(2134|2231)`

### What changes were proposed in this pull request?

This PR proposes to assign proper name and `sqlState` to `_LEGACY_ERROR_TEMP_(2134|2231)`

- `_LEGACY_ERROR_TEMP_2134` -> `CANNOT_PARSE_STRING_AS_DATATYPE`
- `_LEGACY_ERROR_TEMP_2231` -> `UNSUPPORTED_CALL.FIELD_INDEX`

### Why are the changes needed?

To improve error usability

### Does this PR introduce _any_ user-facing change?

No API changes, but the user-facing error message will be improved

### How was this patch tested?

Added UTs.

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

No.

Closes apache#45244 from itholic/TOP_LEGACY_ERRORS.

Authored-by: Haejoon Lee <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
jpcorreia99 pushed a commit to jpcorreia99/spark that referenced this pull request Mar 12, 2024
…R_TEMP_(2134|2231)`

### What changes were proposed in this pull request?

This PR proposes to assign proper name and `sqlState` to `_LEGACY_ERROR_TEMP_(2134|2231)`

- `_LEGACY_ERROR_TEMP_2134` -> `CANNOT_PARSE_STRING_AS_DATATYPE`
- `_LEGACY_ERROR_TEMP_2231` -> `UNSUPPORTED_CALL.FIELD_INDEX`

### Why are the changes needed?

To improve error usability

### Does this PR introduce _any_ user-facing change?

No API changes, but the user-facing error message will be improved

### How was this patch tested?

Added UTs.

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

No.

Closes apache#45244 from itholic/TOP_LEGACY_ERRORS.

Authored-by: Haejoon Lee <haejoon.lee@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants