kadirozde commented on code in PR #2015:
URL: https://github.com/apache/phoenix/pull/2015#discussion_r1833342246


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCQueryIT.java:
##########
@@ -135,6 +140,117 @@ private void 
cdcIndexShouldNotBeUsedForDataTableQueries(Connection conn, String
         String explainPlan = QueryUtil.getExplainPlan(rs);
         assertFalse(explainPlan.contains(cdcName));
     }
+
+    private boolean isDistinctPrefixFilterIncludedInFilterList(FilterList 
filterList) {
+        for (Filter filter : filterList.getFilters()) {
+            if (filter instanceof DistinctPrefixFilter) {
+                return true;
+            } else if (filter instanceof FilterList) {
+                return isDistinctPrefixFilterIncludedInFilterList((FilterList) 
filter);
+            }
+        }
+        return false;
+    }
+    private boolean isDistinctPrefixFilterIncluded(Scan scan) {
+        Filter filter = scan.getFilter();
+        if (filter != null && filter instanceof DistinctPrefixFilter) {
+            return true;
+        } else if (filter instanceof FilterList) {
+                return isDistinctPrefixFilterIncludedInFilterList((FilterList) 
filter);
+        }
+        return false;
+    }
+
+    private void checkIndexPartitionIdCount(Connection conn, String cdcName) 
throws Exception {
+        // Verify that we can use retrieve partition ids
+        ResultSet rs = conn.createStatement().executeQuery("SELECT 
PARTITION_ID() FROM "

Review Comment:
   Add ORDER BY PARTITION_ID() to make sure rows are returned orderly here (by 
Tanuj)



-- 
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: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to