Skip to content

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Nov 6, 2024

What changes were proposed in this pull request?

This PR proposes to Integrate _LEGACY_ERROR_TEMP_2167 into INVALID_JSON_RECORD_TYPE

Why are the changes needed?

To improve the error message by assigning proper error condition and SQLSTATE

Does this PR introduce any user-facing change?

No, only user-facing error message improved

How was this patch tested?

Updated the existing tests

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

No

…OR_TEMP_2167: MALFORMED_RECORD_IN_SCHEMA_INFERENCE
@itholic itholic requested a review from MaxGekk November 6, 2024 17:06
@github-actions github-actions bot added the SQL label Nov 6, 2024
},
"sqlState" : "22023"
},
"MALFORMED_RECORD_IN_SCHEMA_INFERENCE" : {
Copy link
Member

Choose a reason for hiding this comment

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

The error condition is pretty much related to JSON. Let's reflect this in its name.

Also the record might be a correct JSON record but has unexpected type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good.
Just applied the comments, thanks!

@MaxGekk MaxGekk changed the title [SPARK-50246][SQL] Assign appropriate error condition for _LEGACY_ERROR_TEMP_2167: MALFORMED_RECORD_IN_SCHEMA_INFERENCE [SPARK-50246][SQL] Assign appropriate error condition for _LEGACY_ERROR_TEMP_2167: INVALID_JSON_RECORD_TYPE Nov 13, 2024
@MaxGekk
Copy link
Member

MaxGekk commented Nov 13, 2024

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

@MaxGekk MaxGekk closed this in 6fb1d43 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants