kgyrtkirk commented on code in PR #15086:
URL: https://github.com/apache/druid/pull/15086#discussion_r1350166120


##########
sql/src/test/java/org/apache/druid/sql/calcite/BaseCalciteQueryTest.java:
##########
@@ -1054,6 +1059,39 @@ public Map<String, Object> baseQueryContext()
     }
   }
 
+  /**
+   * Validates the results with slight loosening in case {@link NullHandling} 
is not sql compatible.
+   *
+   * In case {@link NullHandling#replaceWithDefault()} an expected results of 
<code>null</code> accepts
+   * both <code>null</code> and the default value for that column as actual 
result.
+   */
+  public void assertResultsValid(String message, List<Object[]> expected, 
QueryResults queryResults)
+  {
+    List<Object[]> results = queryResults.results;
+    int numRows = Math.min(results.size(), expected.size());

Review Comment:
   no; this was a mistake; actually there is not much benefit checking first n 
results and then the count so I've added a check to ensure that the equal



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to