Jackie-Jiang commented on code in PR #8766:
URL: https://github.com/apache/pinot/pull/8766#discussion_r881937489
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java:
##########
@@ -65,6 +67,7 @@ public ImmutableSegmentImpl(SegmentDirectory
segmentDirectory, SegmentMetadataIm
_segmentMetadata = segmentMetadata;
_indexContainerMap = columnIndexContainerMap;
_starTreeIndexContainer = starTreeIndexContainer;
+ _lazyDataSource = new
HashMap<>(segmentMetadata.getColumnMetadataMap().size());
Review Comment:
We can create all the data sources up-front in the constructor instead of
creating them lazily. If we create them lazily, we need to use a concurrent map
here, which might impact performance; also, the first query hitting the column
could be slower than other queries.
--
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]