mcvsubbu commented on a change in pull request #4774: Refactor virtualColumn
URL: https://github.com/apache/incubator-pinot/pull/4774#discussion_r350341845
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java
##########
@@ -226,7 +227,7 @@ public void addSegment(String segmentName, TableConfig
tableConfig, IndexLoading
_logger.error("Not adding segment {}", segmentName);
throw new RuntimeException("Mismatching schema/table config for " +
_tableNameWithType);
}
- VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema(schema);
+
VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSegmentSchema(schema,
NetUtil.getHostnameOrAddress(), segmentName);
Review comment:
```suggestion
VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSegmentSchema(schema,
segmentName);
```
Given that this is a static function, why not let
VirtualColumnProviderFactory determine the hostName (and perhaps anything else
that may be needed as a part of being in cloud, for example)? It can do so on a
static basis as well, instead of doing it for every segment.
----------------------------------------------------------------
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]