You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "zhtaoxiang (via GitHub)" <gi...@apache.org> on 2023/08/19 19:03:57 UTC

[GitHub] [pinot] zhtaoxiang opened a new pull request, #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

zhtaoxiang opened a new pull request, #11389:
URL: https://github.com/apache/pinot/pull/11389

   This PR creates h2 tables for result comparison in TPCHQueryIntegrationTest, so that we can detect the difference.
   
   We will add the comparison logic when Pinot queries are fixed.
   


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


[GitHub] [pinot] codecov-commenter commented on pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11389:
URL: https://github.com/apache/pinot/pull/11389#issuecomment-1685091802

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/11389?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#11389](https://app.codecov.io/gh/apache/pinot/pull/11389?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e409010) into [master](https://app.codecov.io/gh/apache/pinot/commit/a5a1641e60a6b484e1c8c2c5e55daf63a8412fa6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (a5a1641) will **decrease** coverage by `46.87%`.
   > Report is 1 commits behind head on master.
   > The diff coverage is `n/a`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #11389       +/-   ##
   =============================================
   - Coverage     61.42%   14.56%   -46.87%     
   + Complexity     6512      495     -6017     
   =============================================
     Files          2234     2159       -75     
     Lines        120158   116964     -3194     
     Branches      18239    17787      -452     
   =============================================
   - Hits          73811    17037    -56774     
   - Misses        40918    98515    +57597     
   + Partials       5429     1412     -4017     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-17](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.56% <ø> (-46.72%)` | :arrow_down: |
   | [java-20](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.56% <ø> (-46.87%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/11389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.56% <ø> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   [see 1470 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/11389/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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


[GitHub] [pinot] zhtaoxiang commented on a diff in pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "zhtaoxiang (via GitHub)" <gi...@apache.org>.
zhtaoxiang commented on code in PR #11389:
URL: https://github.com/apache/pinot/pull/11389#discussion_r1299276163


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {
+    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(pinotQuery);
     org.apache.pinot.client.ResultSet resultTableResultSet = pinotResultSetGroup.getResultSet(0);
-
     if (CollectionUtils.isNotEmpty(pinotResultSetGroup.getExceptions())) {
       Assert.fail(String.format(
-          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), query));
+          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), pinotQuery));
     }
-    // TODO: Enable the following 2 assertions after fixing the data so each query returns non-zero rows
-    /*
-    Assert.assertTrue(resultTableResultSet.getRowCount() > 0,
-        String.format("Expected non-zero rows for tpc-h query: %s", query));
-    Assert.assertTrue(resultTableResultSet.getColumnCount() > 0,
-        String.format("Expected non-zero columns for tpc-h query: %s", query)); */
+
+    int numRows = resultTableResultSet.getRowCount();
+    int numColumns = resultTableResultSet.getColumnCount();
+
+    // h2 response
+    Assert.assertNotNull(_h2Connection);
+    Statement h2statement = _h2Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+    h2statement.execute(h2Query);
+    ResultSet h2ResultSet = h2statement.getResultSet();
+    // TODO: fix the query parsing issue in Pinot
+    //  many queries fail due to "ERROR [Connection] [main] Cannot parse table name from query"
+    //  java.lang.ClassCastException:
+    //  class org.apache.calcite.sql.SqlSelect cannot be cast to class org.apache.calcite.sql.SqlBasicCall

Review Comment:
   Maybe I misunderstood something
   1. we haven't implemented the comparison logic
   2. exception is thrown when we execute pinot query at line 122 
   
   What is your suggestion here?



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


[GitHub] [pinot] xiangfu0 commented on a diff in pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #11389:
URL: https://github.com/apache/pinot/pull/11389#discussion_r1299266541


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {
+    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(pinotQuery);
     org.apache.pinot.client.ResultSet resultTableResultSet = pinotResultSetGroup.getResultSet(0);
-
     if (CollectionUtils.isNotEmpty(pinotResultSetGroup.getExceptions())) {
       Assert.fail(String.format(
-          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), query));
+          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), pinotQuery));
     }
-    // TODO: Enable the following 2 assertions after fixing the data so each query returns non-zero rows
-    /*
-    Assert.assertTrue(resultTableResultSet.getRowCount() > 0,
-        String.format("Expected non-zero rows for tpc-h query: %s", query));
-    Assert.assertTrue(resultTableResultSet.getColumnCount() > 0,
-        String.format("Expected non-zero columns for tpc-h query: %s", query)); */
+
+    int numRows = resultTableResultSet.getRowCount();
+    int numColumns = resultTableResultSet.getColumnCount();
+
+    // h2 response
+    Assert.assertNotNull(_h2Connection);
+    Statement h2statement = _h2Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+    h2statement.execute(h2Query);
+    ResultSet h2ResultSet = h2statement.getResultSet();
+    // TODO: fix the query parsing issue in Pinot
+    //  many queries fail due to "ERROR [Connection] [main] Cannot parse table name from query"
+    //  java.lang.ClassCastException:
+    //  class org.apache.calcite.sql.SqlSelect cannot be cast to class org.apache.calcite.sql.SqlBasicCall

Review Comment:
   For v2, I think we should just write row comparison logic, instead of reusing existing logic, which expects v1 query only,



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


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11389:
URL: https://github.com/apache/pinot/pull/11389#discussion_r1299495452


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {
+    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(pinotQuery);
     org.apache.pinot.client.ResultSet resultTableResultSet = pinotResultSetGroup.getResultSet(0);
-
     if (CollectionUtils.isNotEmpty(pinotResultSetGroup.getExceptions())) {
       Assert.fail(String.format(
-          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), query));
+          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), pinotQuery));
     }
-    // TODO: Enable the following 2 assertions after fixing the data so each query returns non-zero rows
-    /*
-    Assert.assertTrue(resultTableResultSet.getRowCount() > 0,
-        String.format("Expected non-zero rows for tpc-h query: %s", query));
-    Assert.assertTrue(resultTableResultSet.getColumnCount() > 0,
-        String.format("Expected non-zero columns for tpc-h query: %s", query)); */
+
+    int numRows = resultTableResultSet.getRowCount();
+    int numColumns = resultTableResultSet.getColumnCount();
+
+    // h2 response
+    Assert.assertNotNull(_h2Connection);
+    Statement h2statement = _h2Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+    h2statement.execute(h2Query);
+    ResultSet h2ResultSet = h2statement.getResultSet();
+    // TODO: fix the query parsing issue in Pinot
+    //  many queries fail due to "ERROR [Connection] [main] Cannot parse table name from query"
+    //  java.lang.ClassCastException:
+    //  class org.apache.calcite.sql.SqlSelect cannot be cast to class org.apache.calcite.sql.SqlBasicCall
+    //  (org.apache.calcite.sql.SqlSelect and org.apache.calcite.sql.SqlBasicCall are in unnamed module of loader 'app')

Review Comment:
   This exception is thrown from controller when trying to get the table names from query, but won't fail the query. It will choose a random broker as the fall back path.
   Just running the query in H2 doesn't provide much value. We want to compare the results from Pinot and H2 to ensure the results are expected



##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {

Review Comment:
   I think we should modify pinot query to be sql standard, and use the same query for pinot engine and H2



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


[GitHub] [pinot] zhtaoxiang commented on pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "zhtaoxiang (via GitHub)" <gi...@apache.org>.
zhtaoxiang commented on PR #11389:
URL: https://github.com/apache/pinot/pull/11389#issuecomment-1685132350

   > Can you also take a look at the test failure? Maybe not related to this PR, but seems like related to multi-stage engine
   
   I run the tests (All tests in MultiStageEngineIntegrationTest) locally several times, but cannot reproduce it. Let me run the entire test set


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


[GitHub] [pinot] xiangfu0 commented on a diff in pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #11389:
URL: https://github.com/apache/pinot/pull/11389#discussion_r1299370102


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {
+    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(pinotQuery);
     org.apache.pinot.client.ResultSet resultTableResultSet = pinotResultSetGroup.getResultSet(0);
-
     if (CollectionUtils.isNotEmpty(pinotResultSetGroup.getExceptions())) {
       Assert.fail(String.format(
-          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), query));
+          "TPC-H query raised exception: %s. query: %s", pinotResultSetGroup.getExceptions().get(0), pinotQuery));
     }
-    // TODO: Enable the following 2 assertions after fixing the data so each query returns non-zero rows
-    /*
-    Assert.assertTrue(resultTableResultSet.getRowCount() > 0,
-        String.format("Expected non-zero rows for tpc-h query: %s", query));
-    Assert.assertTrue(resultTableResultSet.getColumnCount() > 0,
-        String.format("Expected non-zero columns for tpc-h query: %s", query)); */
+
+    int numRows = resultTableResultSet.getRowCount();
+    int numColumns = resultTableResultSet.getColumnCount();
+
+    // h2 response
+    Assert.assertNotNull(_h2Connection);
+    Statement h2statement = _h2Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+    h2statement.execute(h2Query);
+    ResultSet h2ResultSet = h2statement.getResultSet();
+    // TODO: fix the query parsing issue in Pinot
+    //  many queries fail due to "ERROR [Connection] [main] Cannot parse table name from query"
+    //  java.lang.ClassCastException:
+    //  class org.apache.calcite.sql.SqlSelect cannot be cast to class org.apache.calcite.sql.SqlBasicCall

Review Comment:
   Oh, what I mean is the comparison used in `ClusterIntegrationTestUtils.testQuery()`.
   
   This parse tablename exception shouldn't be a blocker.



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


[GitHub] [pinot] zhtaoxiang commented on a diff in pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "zhtaoxiang (via GitHub)" <gi...@apache.org>.
zhtaoxiang commented on code in PR #11389:
URL: https://github.com/apache/pinot/pull/11389#discussion_r1300692399


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TPCHQueryIntegrationTest.java:
##########
@@ -105,28 +108,37 @@ public void setUp()
       ClusterIntegrationTestUtils.buildSegmentsFromAvro(Collections.singletonList(dataFile), tableConfig, schema, 0,
           tableSegmentDir, tarDir);
       uploadSegments(tableName, tarDir);
+      // H2
+      ClusterIntegrationTestUtils.setUpH2TableWithAvro(Collections.singletonList(dataFile), tableName, _h2Connection);
     }
   }
 
   @Test(dataProvider = "QueryDataProvider")
-  public void testTPCHQueries(String query) {
-    testQueriesSucceed(query);
+  public void testTPCHQueries(String[] pinotAndH2Queries) throws Exception {
+    testQueriesSucceed(pinotAndH2Queries[0], pinotAndH2Queries[1]);
   }
 
-  protected void testQueriesSucceed(String query) {
-    ResultSetGroup pinotResultSetGroup = getPinotConnection().execute(query);
+  protected void testQueriesSucceed(String pinotQuery, String h2Query) throws Exception {

Review Comment:
   currently, Pinot does not support `extract()` function, we can make them the same once Pinot adds support of `exact()` function 



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


[GitHub] [pinot] Jackie-Jiang merged pull request #11389: create h2 tables for result comparison in TPCHQueryIntegrationTest

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #11389:
URL: https://github.com/apache/pinot/pull/11389


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