navina commented on code in PR #9205:
URL: https://github.com/apache/pinot/pull/9205#discussion_r947282991
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java:
##########
@@ -966,16 +966,21 @@ public Set<String> getPhysicalColumnNames() {
public DataSource getDataSource(String column) {
FieldSpec fieldSpec = _schema.getFieldSpecFor(column);
if (fieldSpec == null || fieldSpec.isVirtualColumn()) {
+ VirtualColumnContext virtualColumnContext = null;
// Column is either added during ingestion, or was initiated with a
virtual column provider
if (fieldSpec == null) {
// If the column was added during ingestion, we will construct the
column provider based on its fieldSpec to
// provide values
fieldSpec = _newlyAddedColumnsFieldMap.get(column);
Preconditions.checkNotNull(fieldSpec,
"FieldSpec for " + column + " should not be null. " + "Potentially
invalid column name specified.");
+ // newly added column shouldn't have any doc count?
+ virtualColumnContext = new VirtualColumnContext(fieldSpec, 0);
Review Comment:
ah I see. I thought the doc count here represents number of docs with
non-null values for this column.
I wasn't sure about this change. Thanks for clarifying. Let me revert to old
code and verify that the fix still works.
--
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]