gortiz commented on code in PR #15135: URL: https://github.com/apache/pinot/pull/15135#discussion_r1973355288
########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/SpoolIntegrationTest.java: ########## @@ -117,13 +121,146 @@ public void intermediateSpool() JsonNode stats = jsonNode.get("stageStats"); assertNoError(jsonNode); DocumentContext parsed = JsonPath.parse(stats.toString()); - List<Map<String, Object>> stage4On3 = parsed.read("$..[?(@.stage == 3)]..[?(@.stage == 4)]"); - Assert.assertEquals(stage4On3.size(), 1, "Stage 4 should be descended from stage 3 exactly once"); - List<Map<String, Object>> stage4On7 = parsed.read("$..[?(@.stage == 7)]..[?(@.stage == 4)]"); - Assert.assertEquals(stage4On3.size(), 1, "Stage 4 should be descended from stage 7 exactly once"); + checkSpoolTimes(parsed, 4, 3, 1); + checkSpoolTimes(parsed, 4, 7, 1); + checkSpoolSame(parsed, 4, 3, 7); + } + + /** + * Test a complex with nested spools. Don't try to understand it, just check that the spools are correct. + * The test name corresponds to the PR that fixed the issue. + */ + @Test + public void test15135() Review Comment: In general, it is a good practice to include the number where the issue was detected, but in this case, I'm using this because... I have no clue what this query is testing. The only thing I know is that it was the simplified version of a query that detected the errors fixed here. I don't know if `testMultiSpools` is correct. More tests with multi-spools can be created in the future. Anyway, I can change it if you think it is useful. -- 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-unsubscr...@pinot.apache.org 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