Move PinotDataType from pinot-common to pinot-spi#18481
Merged
Jackie-Jiang merged 1 commit intoMay 13, 2026
Conversation
5f23483 to
8f49f08
Compare
xiangfu0
approved these changes
May 12, 2026
8f49f08 to
2f73881
Compare
This makes PinotDataType reachable from pinot-spi-only modules (ColumnReader etc.), so the SPI's value-type API can return a PinotDataType that already encodes SV/MV + Java representation instead of pairing FieldSpec.DataType with a separate isSingleValue() flag. The only pinot-common-specific coupling was the static helper getPinotDataTypeForExecution(ColumnDataType) and its single caller (PostAggregationFunction). The helper is moved onto ColumnDataType itself as the instance method toPinotDataType(), so PinotDataType has no dependency on pinot-common after the move. 22 import declarations across the codebase are updated to the new package; two checkstyle.xml entries that allow PinotDataType.* static imports are updated to the new path. PinotDataTypeTest moves alongside.
2f73881 to
413eab0
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18481 +/- ##
============================================
- Coverage 63.72% 63.66% -0.07%
- Complexity 1679 1685 +6
============================================
Files 3265 3265
Lines 199745 199745
Branches 31012 31013 +1
============================================
- Hits 127296 127175 -121
- Misses 62296 62432 +136
+ Partials 10153 10138 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
PinotDataTypefrompinot-common/.../utils/topinot-spi/.../utils/, with the matching test (PinotDataTypeTest). The class previously held one pinot-common-specific helper,getPinotDataTypeForExecution(ColumnDataType), which is moved ontoColumnDataTypeas the instance methodtoPinotDataType()— leavingPinotDataTypefree of anypinot-commonreferences.config/checkstyle.xmlentries that allowPinotDataType.*static imports.PostAggregationFunction) is updated to callargumentTypes[i].toPinotDataType().ColumnDataType→PinotDataTypemappings that were absent from the originalgetPinotDataTypeForExecutionswitch: addsMAP,BOOLEAN_ARRAY, andTIMESTAMP_ARRAYcases. The old switch threwIllegalStateExceptionfor these even though they are validColumnDataTypevalues.Motivation
pinot-spimodules (e.g.ColumnReader) currently can't referencePinotDataTypebecause of the dependency direction (pinot-common→pinot-spi). After this move, the SPI's value-type APIs can return aPinotDataTypedirectly — which encodes SV/MV + Java representation in one value — instead of pairingFieldSpec.DataTypewith a separateisSingleValue()flag. This enables downstream simplifications such as collapsingDataTypeColumnTransformer.isNoOp()to a single equality check against the destination type.No behavior change apart from the three previously-missing
ColumnDataTypemappings noted above; otherwise pure code motion plus the rename of one helper.🤖 Generated with Claude Code