You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by su...@apache.org on 2018/12/11 21:49:47 UTC
[incubator-pinot] 01/02: Fix VirtualColumns being written out while
segment is built
This is an automated email from the ASF dual-hosted git repository.
sunithabeeram pushed a commit to branch VirtualColumnsRT
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 7b197c7aa4499753426d52e0205bf838c155b700
Author: Sunitha Beeram <sb...@sbeeram-ld2.linkedin.biz>
AuthorDate: Tue Dec 11 10:17:46 2018 -0800
Fix VirtualColumns being written out while segment is built
---
.../core/indexsegment/immutable/ImmutableSegmentLoader.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/pinot-core/src/main/java/com/linkedin/pinot/core/indexsegment/immutable/ImmutableSegmentLoader.java b/pinot-core/src/main/java/com/linkedin/pinot/core/indexsegment/immutable/ImmutableSegmentLoader.java
index 64ea1af..b1313bf 100644
--- a/pinot-core/src/main/java/com/linkedin/pinot/core/indexsegment/immutable/ImmutableSegmentLoader.java
+++ b/pinot-core/src/main/java/com/linkedin/pinot/core/indexsegment/immutable/ImmutableSegmentLoader.java
@@ -113,15 +113,12 @@ public class ImmutableSegmentLoader {
new PhysicalColumnIndexContainer(segmentReader, entry.getValue(), indexLoadingConfig));
}
- // Synthesize schema if necessary, adding virtual columns
- if (schema != null) {
- VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema(schema);
- } else {
+ if (schema == null) {
schema = segmentMetadata.getSchema();
}
- // Ensure that the schema in the segment metadata also has the virtual columns added
- VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema(segmentMetadata.getSchema());
+ // Ensure that the schema has the virtual columns added
+ VirtualColumnProviderFactory.addBuiltInVirtualColumnsToSchema(schema);
// Instantiate virtual columns
for (String columnName : schema.getColumnNames()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org