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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to