praveenc7 commented on code in PR #15350: URL: https://github.com/apache/pinot/pull/15350#discussion_r2143945284
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java: ########## @@ -239,12 +240,14 @@ public SegmentMetadataImpl getSegmentMetadata() { @Override public DataSource getDataSource(String column, Schema schema) { DataSource dataSource = getDataSourceNullable(column); - if (dataSource == null) { - dataSource = IndexSegmentUtils.getVirtualDataSource(schema, _segmentMetadata.getSchema(), column, - _segmentMetadata.getTotalDocs()); - _dataSources.put(column, dataSource); + if (dataSource != null) { + return dataSource; } - return dataSource; + FieldSpec fieldSpec = schema.getFieldSpecFor(column); Review Comment: My bad, I see you changed `getDataSourceNullable` in MutableSegmentImpl to first check in segment schema and then in table schema ########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java: ########## @@ -239,12 +240,14 @@ public SegmentMetadataImpl getSegmentMetadata() { @Override public DataSource getDataSource(String column, Schema schema) { DataSource dataSource = getDataSourceNullable(column); - if (dataSource == null) { - dataSource = IndexSegmentUtils.getVirtualDataSource(schema, _segmentMetadata.getSchema(), column, - _segmentMetadata.getTotalDocs()); - _dataSources.put(column, dataSource); + if (dataSource != null) { + return dataSource; } - return dataSource; + FieldSpec fieldSpec = schema.getFieldSpecFor(column); Review Comment: My bad, I see you changed `getDataSourceNullable` in `MutableSegmentImpl` to first check in segment schema and then in table schema -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org