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-48166][SQL] Avoid using BadRecordException as user-facing error in VariantExpressionEvalUtils #46428

Conversation

vladimirg-db
Copy link
Contributor

What changes were proposed in this pull request?

Stop using BadRecordException in a user-facing context. Currently it is thrown then the parse_json input is malformed.

Why are the changes needed?

BadRecordException is an internal exception designed for FailureSafeParser.

Does this PR introduce any user-facing change?

Yes, parse_json will not expose BadRecordException in error.

How was this patch tested?

testOnly org.apache.spark.sql.catalyst.expressions.variant.VariantExpressionEvalUtilsSuite

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

No

@github-actions github-actions bot added the SQL label May 7, 2024
@vladimirg-db vladimirg-db changed the title Avoid using BadRecordException as user-facing error in VariantExpressionEvalUtils [SPARK-48166][SQL] Avoid using BadRecordException as user-facing error in VariantExpressionEvalUtils May 7, 2024
@vladimirg-db vladimirg-db marked this pull request as ready for review May 7, 2024 06:43
@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 7f8ef96 May 7, 2024
@vladimirg-db vladimirg-db deleted the vladimirg-db/get-rid-of-bad-record-exception-in-variant-expression-eval-utils branch May 7, 2024 09:15
JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
…r in VariantExpressionEvalUtils

### What changes were proposed in this pull request?
Stop using `BadRecordException` in a user-facing context. Currently it is thrown then the `parse_json` input is malformed.

### Why are the changes needed?
`BadRecordException` is an internal exception designed for `FailureSafeParser`.

### Does this PR introduce _any_ user-facing change?
Yes, `parse_json` will not expose `BadRecordException` in error.

### How was this patch tested?
`testOnly org.apache.spark.sql.catalyst.expressions.variant.VariantExpressionEvalUtilsSuite`

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

Closes apache#46428 from vladimirg-db/vladimirg-db/get-rid-of-bad-record-exception-in-variant-expression-eval-utils.

Authored-by: Vladimir Golubev <vladimir.golubev@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants