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



##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/DistinctQueriesTest.java
##########
@@ -394,285 +614,273 @@ private DistinctTable 
getDistinctTableInnerSegment(String query, boolean isPql)
    *   </li>
    * </ul>
    */
-  private void testDistinctInterSegmentHelper(String[] pqlQueries, String[] 
sqlQueries)
-      throws Exception {
-    ImmutableSegment segment0 = createSegment(0, generateRecords(0));
-    ImmutableSegment segment1 = createSegment(1, generateRecords(1000));
-    _indexSegments = Arrays.asList(segment0, segment1);
-    try {
-      {
-        // Test selecting all columns
-        String pqlQuery = pqlQueries[0];
-        String sqlQuery = sqlQueries[0];
-
-        // Check data schema
-        BrokerResponseNative pqlResponse = 
getBrokerResponseForPqlQuery(pqlQuery);
-        SelectionResults selectionResults = pqlResponse.getSelectionResults();
-        assertNotNull(selectionResults);
-        assertEquals(selectionResults.getColumns(),
-            Arrays.asList("intColumn", "longColumn", "floatColumn", 
"doubleColumn", "stringColumn", "bytesColumn"));
-        BrokerResponseNative sqlResponse = 
getBrokerResponseForSqlQuery(sqlQuery);
-        ResultTable resultTable = sqlResponse.getResultTable();
-        assertNotNull(resultTable);
-        DataSchema dataSchema = resultTable.getDataSchema();
-        assertEquals(dataSchema.getColumnNames(),
-            new String[]{"intColumn", "longColumn", "floatColumn", 
"doubleColumn", "stringColumn", "bytesColumn"});
-        assertEquals(dataSchema.getColumnDataTypes(),
-            new ColumnDataType[]{ColumnDataType.INT, ColumnDataType.LONG, 
ColumnDataType.FLOAT, ColumnDataType.DOUBLE, ColumnDataType.STRING, 
ColumnDataType.BYTES});
-
-        // Check values, where all 200 unique values should be returned
-        List<Serializable[]> pqlRows = selectionResults.getRows();
-        assertEquals(pqlRows.size(), 2 * NUM_UNIQUE_RECORDS_PER_SEGMENT);
-        List<Object[]> sqlRows = resultTable.getRows();
-        assertEquals(sqlRows.size(), 2 * NUM_UNIQUE_RECORDS_PER_SEGMENT);
-        Set<Integer> expectedValues = new HashSet<>();
-        for (int i = 0; i < NUM_UNIQUE_RECORDS_PER_SEGMENT; i++) {
+  private void testDistinctInterSegmentHelper(String[] pqlQueries, String[] 
sqlQueries) {
+    {
+      // Test selecting all columns
+      String pqlQuery = pqlQueries[0];
+      String sqlQuery = sqlQueries[0];
+
+      // Check data schema
+      BrokerResponseNative pqlResponse = 
getBrokerResponseForPqlQuery(pqlQuery);

Review comment:
       Why do we need that? On the server side, PQL and SQL are handled the 
same way, and we can use the same test logic for both




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to