Better error message for unsupported Arrow vector type in Spark reader - #8759
Merged
robert3005 merged 1 commit intoJul 15, 2026
Merged
Conversation
VortexArrowColumnVector.initAccessor threw a bare UnsupportedOperationException with no message, leaving only a stack trace when an unhandled Arrow vector type is encountered. Include the offending vector class, matching the existing idiom in ArrowUtils. Signed-off-by: jackylee <qcsd2011@gmail.com>
robert3005
approved these changes
Jul 15, 2026
Contributor
Author
|
Thanks. @robert3005 |
robert3005
pushed a commit
that referenced
this pull request
Aug 3, 2026
… Vortex files (#8858) ## Rationale for this change When `VortexDataSourceV2.inferSchema` is pointed at a directory that contains no `.vortex` files, it currently throws `RuntimeException("UNABLE_TO_INFER_SCHEMA format: vortex")`. The message does not say *which* path failed, so with multi-path reads (or a typo'd location) users have nothing to go on. This is the same kind of diagnosability gap as #8759 (unsupported ColumnVector type error message). ## What changes are included in this PR? - `inferSchema` now throws `IllegalArgumentException` with a message that names the offending path and suggests the likely fixes: `Unable to infer schema for vortex: no .vortex files found under path <path>. Check that the path is correct and contains at least one Vortex file, or provide an explicit schema.` - The `@throws` javadoc on `inferSchema` is updated to match. - A new `VortexDataSourceInferSchemaTest` reads an empty temp directory through the real `spark.read().format("vortex").load(...)` path and asserts the failure message names the path (walking the cause chain, since Spark may wrap data source exceptions). Passing locally on both matrix legs (`:vortex-spark_2.12:test` and `:vortex-spark_2.13:test` with `--tests 'dev.vortex.spark.VortexDataSourceInferSchemaTest'`). ## What APIs are changed? Are there any user-facing changes? The exception type thrown by `inferSchema` for the no-files case changes from a bare `RuntimeException` to `IllegalArgumentException` (still a `RuntimeException` subtype), and the message text changes as described. No other behavior changes. Signed-off-by: jackylee <qcsd2011@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
VortexArrowColumnVector.initAccessorthrew a bareUnsupportedOperationExceptionwith no message when it encountered an Arrow vector type it does not handle. When
this fires, the user only gets a stack trace with no indication of which type was
unsupported, making it needlessly hard to diagnose.
What changes are included in this PR?
Include the offending vector's class name in the exception message, matching the
existing idiom already used in
ArrowUtils("Unsupported Arrow type: " + ...).No behavior change beyond the message text.
What APIs are changed? Are there any user-facing changes?
No API changes. Only the text of an already-thrown exception is improved.