siddharthteotia commented on a change in pull request #6969: URL: https://github.com/apache/incubator-pinot/pull/6969#discussion_r639070818
########## File path: pinot-integration-tests/src/test/java/org/apache/pinot/compat/tests/SqlResultComparator.java ########## @@ -113,9 +126,147 @@ public static boolean areEqual(JsonNode actual, JsonNode expected, String query) if (expected.has(FIELD_IS_SUPERSET) && expected.get(FIELD_IS_SUPERSET).asBoolean(false)) { return areElementsSubset(actualElementsSerialized, expectedElementsSerialized); } else { - return areLengthsEqual(actual, expected) && areElementsEqual(actualElementsSerialized, expectedElementsSerialized, - query) && areMetadataEqual(actual, expected); + if (!areLengthsEqual(actual, expected)) { + return false; + } + /* + * Pinot server do some early termination optimization (process in parallel and early return if get enough + * documents to fulfill the LIMIT and OFFSET requirement) for queries: + * - selection without order by + * - selection with order by (by sorting the segments on min-max value) + * - DISTINCT queries. + * numDocsScanned is no-deterministic for those queries so numDocsScanned comparison should be skipped. + * Review comment: (nit) typo non-deterministic -- 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