Convert ingestion aggregation source column types before indexing - #19087
Open
Vamsi-klu wants to merge 3 commits into
Open
Convert ingestion aggregation source column types before indexing#19087Vamsi-klu wants to merge 3 commits into
Vamsi-klu wants to merge 3 commits into
Conversation
SUM/MIN/MAX source columns often are not in the schema, so DataTypeTransformer skipped them and ValueAggregator could ClassCast or parse-fail mid-row. Auto register aggregation sources for type conversion in the transform pipeline.
This branch does not change MutableSegmentImpl fail-soft behavior, so oversized SUM_PRECISION must still throw IllegalArgumentException as on master.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19087 +/- ##
=========================================
Coverage 65.47% 65.47%
Complexity 1421 1421
=========================================
Files 3426 3426
Lines 217315 217366 +51
Branches 34509 34522 +13
=========================================
+ Hits 142283 142327 +44
- Misses 63513 63518 +5
- Partials 11519 11521 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Ready for review — all required CI checks are green on this PR. Issue: #16317 Could the following folks take a look when convenient? Formal GitHub "Request review" is unavailable from a fork contributor account on Thank you! |
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.
Why
Ingestion-level aggregations (
SUM(col1) AS col2) are a core rollup-on-write pattern. Whencol1is not in the schema (common — only the aggregated metric is stored),DataTypeTransformernever converted it. Aggregators then saw raw strings/objects, threw (ClassCastException/ parse errors), and left the mutable segment on the partial-row corruption path described in #16316.Impact
SourceFieldConfig/ transformer machinery — no new schema field type.How
RecordTransformerUtils(alongside optional explicitSourceFieldConfig).ValueAggregatorUtils.toDoubleas a safety net; document that pipeline conversion is preferred so bad values fail beforeMutableSegmentImplmutates.Test plan
MutableSegmentImplIngestionAggregationTest— string/non-schema sources for SUM/MIN/MAX-style configs.RecordTransformerTest— aggregation source auto type conversion order/behavior../mvnw -pl pinot-segment-local -am -Dtest=MutableSegmentImplIngestionAggregationTest,RecordTransformerTest -Dsurefire.failIfNoSpecifiedTests=false testRelated
fixes: #16317
related: #16316
Reviewers
Suggested: Jackie-Jiang (issue design guidance)
Was generative AI tooling used to co-author this PR?
Generated-by: Grok Build (xAI)