mcvsubbu commented on a change in pull request #4562: Handle the virtual column 
logic in FieldSpec instead of Schema
URL: https://github.com/apache/incubator-pinot/pull/4562#discussion_r317417643
 
 

 ##########
 File path: 
pinot-core/src/test/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImplAggregateMetricsTest.java
 ##########
 @@ -51,15 +53,21 @@
   public void setUp() {
     Schema schema = new Schema.SchemaBuilder().setSchemaName("testSchema")
         .addSingleValueDimension(DIMENSION_1, FieldSpec.DataType.INT)
-            .addSingleValueDimension(DIMENSION_2, FieldSpec.DataType.STRING)
-            .addMetric(METRIC, FieldSpec.DataType.LONG)
-            .addMetric(METRIC_2, FieldSpec.DataType.FLOAT)
-            .addTime(TIME_COLUMN, TimeUnit.DAYS, FieldSpec.DataType.INT)
-            .build();
+        .addSingleValueDimension(DIMENSION_2, 
FieldSpec.DataType.STRING).addMetric(METRIC, FieldSpec.DataType.LONG)
+        .addMetric(METRIC_2, FieldSpec.DataType.FLOAT).addTime(TIME_COLUMN, 
TimeUnit.DAYS, FieldSpec.DataType.INT)
+        .build();
+    // Add virtual columns, which should not be aggregated
+    DimensionFieldSpec virtualDimensionFieldSpec =
+        new DimensionFieldSpec("$virtualDimension", FieldSpec.DataType.INT, 
true, Object.class);
 
 Review comment:
   nice, thanks for catching the bug and adding this test.

----------------------------------------------------------------
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]

Reply via email to