gortiz commented on code in PR #13618:
URL: https://github.com/apache/pinot/pull/13618#discussion_r1679150035
##########
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:
I am running the query alter, but this ensures the planning is correct. In
case we have a regression, it may fail in the planning check or in the result
check.
If it fails in the plan phase, the error is more clear and therefore easier
to fix.
--
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]