yashmayya commented on code in PR #13618:
URL: https://github.com/apache/pinot/pull/13618#discussion_r1679069817
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java:
##########
@@ -704,6 +704,26 @@ public void testVariadicFunction() throws Exception {
assertEquals(jsonNode.get("numRowsResultSet").asInt(), 3);
}
+ @Test
+ public void skipArrayToMvOptimization()
+ throws Exception {
+ String sqlQuery = "SELECT 1 "
+ + "FROM mytable "
+ + "WHERE ARRAY_TO_MV(RandomAirports) = 'MFR' and
ARRAY_TO_MV(RandomAirports) = 'GTR'";
+
+ JsonNode jsonNode = postQuery("Explain plan for " + sqlQuery);
+ JsonNode plan = jsonNode.get("resultTable").get("rows").get(0).get(1);
+
+ Pattern pattern = Pattern.compile("LogicalValues\\(tuples=\\[\\[]]\\)");
+ String planAsText = plan.asText();
+ boolean matches = pattern.matcher(planAsText).find();
+ Assert.assertFalse(matches, "Plan should not contain contain LogicalValues
node but plan is \n"
+ + planAsText);
Review Comment:
Why not run an actual query instead and assert that the size of the result
row set is non-zero?
--
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]