You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/26 19:18:47 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7632: Support multi-value derived column in offline table reload

Jackie-Jiang commented on a change in pull request #7632:
URL: https://github.com/apache/pinot/pull/7632#discussion_r736845202



##########
File path: pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
##########
@@ -859,7 +860,8 @@ private void reloadWithExtraColumns()
     TableConfig tableConfig = getOfflineTableConfig();
     tableConfig.setIngestionConfig(new IngestionConfig(null, null, null, Arrays
         .asList(new TransformConfig("NewAddedDerivedHoursSinceEpoch", "times(DaysSinceEpoch, 24)"),
-            new TransformConfig("NewAddedDerivedSecondsSinceEpoch", "times(times(DaysSinceEpoch, 24), 3600)")), null));
+            new TransformConfig("NewAddedDerivedSecondsSinceEpoch", "times(times(DaysSinceEpoch, 24), 3600)"),
+            new TransformConfig("NewAddedDerivedMVStringDimension", "split(DestCityName, ',')")), null));

Review comment:
       I think we can split with ', ' (append a space) and compare the new column with `DestState`

##########
File path: pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
##########
@@ -976,6 +978,9 @@ private void testNewAddedColumns()
     pqlQuery = "SELECT COUNT(*) FROM mytable WHERE NewAddedDerivedSecondsSinceEpoch = 1411862400";
     sqlQuery = "SELECT COUNT(*) FROM mytable WHERE DaysSinceEpoch = 16341";
     testQuery(pqlQuery, Collections.singletonList(sqlQuery));
+    pqlQuery = "SELECT COUNT(*) FROM mytable WHERE NewAddedDerivedSecondsSinceEpoch = 1411862400";
+    sqlQuery = "SELECT COUNT(*) FROM mytable WHERE DaysSinceEpoch = 16341";

Review comment:
       Here we can compare the new column with `DestState`
   ```suggestion
       pqlQuery = "SELECT COUNT(*) FROM mytable WHERE NewAddedDerivedMVStringDimension = 'CA'";
       sqlQuery = "SELECT COUNT(*) FROM mytable WHERE DestState = 'CA'";
   ```

##########
File path: pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
##########
@@ -987,8 +992,8 @@ private void testNewAddedColumns()
     pqlQuery = "SELECT SUM(NewAddedLongMetric) FROM mytable WHERE DaysSinceEpoch <= 16312";
     sqlQuery = "SELECT COUNT(*) FROM mytable WHERE DaysSinceEpoch <= 16312";
     testQuery(pqlQuery, Collections.singletonList(sqlQuery));
-    pqlQuery = "SELECT SUM(NewAddedLongMetric) FROM mytable WHERE DaysSinceEpoch > 16312";
-    sqlQuery = "SELECT COUNT(*) FROM mytable WHERE DaysSinceEpoch > 16312";
+    pqlQuery = "SELECT SUM(NewAddedLongMetric) FROM mytable WHERE NewAddedDerivedMVStringDimension = ''";

Review comment:
       This test is not required. This is only for new added metric columns




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

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org