mcvsubbu commented on a change in pull request #4774: Refactor virtualColumn to
extraColumn
URL: https://github.com/apache/incubator-pinot/pull/4774#discussion_r342350155
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/indexsegment/immutable/ImmutableSegmentLoader.java
##########
@@ -119,16 +120,19 @@ public static ImmutableSegment load(File indexDir,
IndexLoadingConfig indexLoadi
}
// Ensure that the schema has the virtual columns added
- VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema(schema);
+ ExtraColumnProviderFactory.addBuiltInVirtualColumnsToSchema(schema);
// Instantiate virtual columns
for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) {
if (fieldSpec.isVirtualColumn()) {
String columnName = fieldSpec.getName();
- VirtualColumnProvider provider =
-
VirtualColumnProviderFactory.buildProvider(fieldSpec.getVirtualColumnProvider());
- VirtualColumnContext context = new
VirtualColumnContext(NetUtil.getHostnameOrAddress(), segmentName, columnName,
- segmentMetadata.getTotalDocs());
+ ExtraColumnProvider provider =
ExtraColumnProviderFactory.buildProvider(fieldSpec);
+ if (columnName.equals(VirtualColumn.HOSTNAME)) {
Review comment:
Please move these lines into
VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema() method
----------------------------------------------------------------
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.
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]