Jackie-Jiang commented on code in PR #18637:
URL: https://github.com/apache/pinot/pull/18637#discussion_r3375690783
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/BaseSegmentCreator.java:
##########
@@ -867,8 +867,14 @@ private void buildStarTreeV2IfNecessary(File indexDir)
if (CollectionUtils.isNotEmpty(starTreeIndexConfigs) ||
enableDefaultStarTree) {
MultipleTreesBuilder.BuildMode buildMode =
_config.isOnHeap() ? MultipleTreesBuilder.BuildMode.ON_HEAP :
MultipleTreesBuilder.BuildMode.OFF_HEAP;
+ // Pass IndexLoadingConfig so downstream readers (e.g. external-table
forward-index readers
Review Comment:
During index creation, we should pass `SegmentGeneratorConfig` instead. You
may change the constructor of `MultipleTreesBuilder` to take only `indexDir`
and `SegmentGeneratorConfig`
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SingleFileIndexDirectory.java:
##########
@@ -345,6 +345,13 @@ private void createRemoteBuffers(List<IndexEntry>
zeroSizeEntries) {
properties.putAll(_segmentDirectoryLoaderContext.getSegmentCustomConfigs());
}
+ // Propagate segment-level custom metadata so downstream readers can read
it
+ if (_segmentMetadata != null && _segmentMetadata.getCustomMap() != null) {
+ for (Map.Entry<String, String> e :
_segmentMetadata.getCustomMap().entrySet()) {
+ properties.setProperty(e.getKey(), e.getValue());
Review Comment:
(minor) Use `putAll()`
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/readers/PinotSegmentColumnReader.java:
##########
@@ -67,6 +70,7 @@ public PinotSegmentColumnReader(ForwardIndexReader
forwardIndexReader, @Nullable
_dictionary = dictionary;
_nullValueVectorReader = nullValueVectorReader;
_valueType = _dictionary != null ? _dictionary.getValueType() :
_forwardIndexReader.getStoredType();
+ _columnName = null;
Review Comment:
Let's pass `column` as the first argument for this constructor. Column name
is always available from the callers
--
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]