fix(spark): include the offending path when schema inference finds no Vortex files#8858
Open
jackylee-ch wants to merge 1 commit into
Open
fix(spark): include the offending path when schema inference finds no Vortex files#8858jackylee-ch wants to merge 1 commit into
jackylee-ch wants to merge 1 commit into
Conversation
robert3005
approved these changes
Jul 20, 2026
Merging this PR will improve performance by 11.17%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
… Vortex files Signed-off-by: jackylee <qcsd2011@gmail.com>
jackylee-ch
force-pushed
the
spark-infer-schema-error-msg
branch
from
July 21, 2026 10:32
94dd273 to
9884816
Compare
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
When
VortexDataSourceV2.inferSchemais pointed at a directory that contains no.vortexfiles, it currently throwsRuntimeException("UNABLE_TO_INFER_SCHEMA format: vortex"). The message does not saywhich 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?
inferSchemanow throwsIllegalArgumentExceptionwith a message that names theoffending 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.@throwsjavadoc oninferSchemais updated to match.VortexDataSourceInferSchemaTestreads an empty temp directory through the realspark.read().format("vortex").load(...)path and asserts the failure message namesthe path (walking the cause chain, since Spark may wrap data source exceptions).
Passing locally on both matrix legs (
:vortex-spark_2.12:testand:vortex-spark_2.13:testwith--tests 'dev.vortex.spark.VortexDataSourceInferSchemaTest').What APIs are changed? Are there any user-facing changes?
The exception type thrown by
inferSchemafor the no-files case changes from a bareRuntimeExceptiontoIllegalArgumentException(still aRuntimeExceptionsubtype),and the message text changes as described. No other behavior changes.