tkhurana commented on code in PR #2048:
URL: https://github.com/apache/phoenix/pull/2048#discussion_r2054713608


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseRowKeyMatcherTestIT.java:
##########
@@ -504,7 +507,42 @@ private Pair<String, byte[]> 
getRowKeyMatchersFromView(PhoenixConnection connect
 
     }
 
-    // Helper to get rowKeyMatcher from Metadata.
+    byte[] getRowKeyMatcherFromSyscatIndex(String tenantId, String schemaName,
+            String tableName, boolean useIndexTable) throws SQLException {
+
+        final String
+                SYS_CATALOG_ROW_KEY_MATCHER_HEADER_SQL =
+                "SELECT ROW_KEY_MATCHER FROM SYSTEM.CATALOG " + "WHERE %s AND 
TABLE_SCHEM <> 'SYSTEM' AND TABLE_NAME = '%s' AND  ROW_KEY_MATCHER IS NOT NULL";
+        final String  SYS_CATALOG_IDX_ROW_KEY_MATCHER_HEADER_SQL = "SELECT 
\"0:ROW_KEY_MATCHER\" FROM SYSTEM.SYS_ROW_KEY_MATCHER_IDX " + "WHERE %s AND 
\":TABLE_SCHEM\" = '%s' AND \":TABLE_NAME\" = '%s'";

Review Comment:
   Here you are explicitly querying the index. Are you asserting somewhere 
where we query syscat but the optimizer transparently generates the plan for 
index and reads from index.



-- 
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]

Reply via email to