mcvsubbu commented on a change in pull request #3607: Filter out
virtual-columns in realtime segment conversion path
URL: https://github.com/apache/incubator-pinot/pull/3607#discussion_r241815382
##########
File path:
pinot-core/src/main/java/com/linkedin/pinot/core/realtime/converter/RealtimeSegmentConverter.java
##########
@@ -150,4 +137,33 @@ public void build(@Nullable SegmentVersion
segmentVersion, ServerMetrics serverM
}
}
}
+
+ /**
+ * Returns a new schema based on the original one. The new schema removes
columns as needed (for ex, virtual cols)
+ * and adds the new timespec to the schema.
+ */
+ @VisibleForTesting
+ public
+ Schema getUpdatedSchema(Schema original) {
+
+ TimeFieldSpec tfs = original.getTimeFieldSpec();
+ // Use outgoing granularity for creating segment
+ TimeGranularitySpec outgoing = tfs.getOutgoingGranularitySpec();
+ TimeFieldSpec newTimeSpec = new TimeFieldSpec(outgoing);
+
+ Schema newSchema = new Schema();
Review comment:
Will iterating over schema.getPhysicalColumns() work here? (since you added
that method)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]