deepthi912 commented on code in PR #18637:
URL: https://github.com/apache/pinot/pull/18637#discussion_r3374963659
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/readers/PinotSegmentColumnReader.java:
##########
@@ -92,7 +96,34 @@ public Dictionary getDictionary() {
}
public int getDictId(int docId) {
- return _forwardIndexReader.getDictId(docId, _forwardIndexReaderContext);
+ if (_forwardIndexReader.isDictionaryEncoded()) {
Review Comment:
Added in commit `112212afba`:
`PinotSegmentColumnReaderRawWithDictionaryTest`. Coverage:
- `testGetDictIdResolvesFromDictionaryForRawForwardIndex` — TestNG
`@DataProvider` over INT / LONG / FLOAT / DOUBLE / BIG_DECIMAL / STRING;
asserts raw-value-from-FI + dictionary-lookup returns the expected dict-id.
- `testGetDictIdResolvesFromDictionaryForRawBytesForwardIndex` — separate
test for the BYTES branch which wraps the raw `byte[]` in `ByteArray` before
`dictionary.indexOf`.
- `testGetDictIdDelegatesToForwardIndexWhenDictionaryEncoded` — asserts the
dictionary-encoded fast-path still short-circuits to
`forwardIndexReader.getDictId(docId, ctx)` and does not touch the materialized
dictionary.
- `testGetDictIdThrowsWhenRawAndNoDictionaryMaterialized` — asserts the
guard throws `UnsupportedOperationException` when forward index is raw and no
dictionary is available.
All 9 cases pass locally.
--
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]