refactor(scan): validate FileScanTask construction - #3131
Merged
Conversation
Make FileScanTask fields private, expose read-only getters, and validate builder output so non-empty partition data always has an associated partition spec. Generated-by: Codex (GPT-5)
Use typed-builder output conversion for validation instead of coupling the custom build method to generated typestate arguments. Generated-by: Codex (GPT-5)
Validate partition arity and transformed value types while preserving support for historical partition specs whose source columns were dropped. Port the partition coverage from PR apache#3091 to builder regression tests. Generated-by: Codex (GPT-5)
blackmwk
commented
Sep 1, 2026
Enforce symmetric partition/spec presence and tuple arity while avoiding per-value transform validation during task construction. Update the spec-id scan fixture to provide its partition tuple. Generated-by: Codex (GPT-5)
blackmwk
commented
Sep 1, 2026
Preserve historical specs with dropped source columns while validating resolvable partition specs against the task schema. Add regression coverage for an incompatible evolved schema. Generated-by: Codex (GPT-5)
CTTY
reviewed
Sep 1, 2026
Remove the dropped-source shortcut and rely directly on PartitionSpec::partition_type for schema validation. Update dropped-source coverage to assert the resulting planning error. Generated-by: Codex (GPT-5)
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.
Which issue does this PR close?
What changes are included in this PR?
Are these changes tested?
AI Disclosure
Codex (GPT-5) was used for implementation, call-site refactoring, review follow-up, and unit-test scaffolding. The resulting diff was reviewed against issue #3130, the relevant checks in PR #3091, the latest inline reviews, and repository conventions. All listed checks were run locally; there are no known uncertainties.