deshmukhpurushothaman opened a new pull request, #20376:
URL: https://github.com/apache/pinot/pull/20376
Part of #17398.
## Problem
`RangeIndexType.validate()` accepts a range index on a `BIG_DECIMAL` column
without a dictionary, because
`BIG_DECIMAL` is numeric. Neither range index creator can index raw
`BIG_DECIMAL` values (`BitSlicedRangeIndexCreator`
and the legacy `RangeIndexCreator` only support INT, LONG, FLOAT and
DOUBLE), so the segment build fails later with
`Unsupported data type: BIG_DECIMAL`.
## Change
- `RangeIndexType.validate()` rejects a range index on a `BIG_DECIMAL`
column without a dictionary, with the message
`Cannot create range index on BIG_DECIMAL column: <col> without
dictionary`. A dictionary-encoded `BIG_DECIMAL`
column (including raw forward index with an explicit dictionary) is
unaffected.
- `IndexCombinationValidationTest`: dict-encoded passes, raw without
dictionary fails, raw with an explicit
dictionary passes.
- `TableIndexingTest.csv`: the expected message for this case is now the
validation message instead of the runtime
error.
## Scope
This only blocks a setup that throws. Per the discussion on #17398 and
#18751, I did not add checks for index
combinations that are merely redundant. To find out whether other
combinations throw, I built and loaded real
segments for 8,262 combinations of data type, single/multi-value, encoding
(raw, dict, raw with explicit
dictionary), sorted column or not, and every set of up to three indexes
(inverted, range, bloom, FST, IFST, text,
JSON, H3, vector). The only case that passed validation and then threw was
this one. The sweep itself is not part
of this PR.
## Validation
- Regression test failed before the change (1 of 55) and passes after.
- `./mvnw -pl pinot-core -am
-Dtest='IndexCombinationValidationTest,TableConfigUtilsTest,TableIndexingTest'
test`:
55 + 96 + 506 tests pass.
- `spotless:apply`, `license:format`, `checkstyle:check`, `license:check` on
`pinot-segment-local` and `pinot-core`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]