You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/25 18:21:56 UTC

[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #6969: Fix partial comparison for realtime table and allow keep cluster on failure

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org