Skip to content

[SPARK-56859][SQL] Create user error for IllegalArgumentException in CSVOptions#55877

Open
shivadarshan-devadiga wants to merge 5 commits into
apache:masterfrom
shivadarshan-devadiga:cveoptions-user-error
Open

[SPARK-56859][SQL] Create user error for IllegalArgumentException in CSVOptions#55877
shivadarshan-devadiga wants to merge 5 commits into
apache:masterfrom
shivadarshan-devadiga:cveoptions-user-error

Conversation

@shivadarshan-devadiga
Copy link
Copy Markdown

@shivadarshan-devadiga shivadarshan-devadiga commented May 14, 2026

What changes were proposed in this pull request?

This PR converts IllegalArgumentException thrown by require() statements in CSVOptions to proper user-facing Spark errors with error classes

Why are the changes needed?

Currently, CSVOptions uses Scala's require() which throws generic IllegalArgumentException with plain text messages. This change aligns lineSep validation with Spark's error handling standards, making errors more actionable and consistent.

Does this PR introduce any user-facing change?

Yes. The error messages for invalid lineSep values will change

How was this patch tested?

All SQL related tests were run including the linsep tests

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

No

cc: @markj-db @MaxGekk @HyukjinKwon

@shivadarshan-devadiga
Copy link
Copy Markdown
Author

@HyukjinKwon The CI pipeline is green now, have made few changes to the test cases; Can you please review it and merge. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants