kadirozde commented on code in PR #1851:
URL: https://github.com/apache/phoenix/pull/1851#discussion_r1516869330
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java:
##########
@@ -1221,4 +1222,29 @@ public void rvcOffsetTrailingNullKeyTest() throws
Exception {
}
}
+ // Test point lookup over data table with index hint and hinted plan is
not applicable
+ @Test
+ public void testRVCOffsetWithNotApplicableIndexHint() throws Exception {
+ String sql = String.format("SELECT /*+ INDEX(%s %s)*/ %s FROM %s "
+ + "WHERE t_id = 'b' AND k1 = 2 AND k2 = 3 OFFSET
(%s)=('a', 1, 2)",
+ TABLE_NAME, INDEX_NAME,
TABLE_ROW_KEY,TABLE_NAME,TABLE_ROW_KEY);
+ try (Statement statement = conn.createStatement()){
+ ResultSet rs = statement.executeQuery("EXPLAIN " + sql);
+ String actualQueryPlan = QueryUtil.getExplainPlan(rs);
+ // As hinted plan is not applicable so use data plan which is
point lookup
+ assertTrue(actualQueryPlan.contains("POINT LOOKUP ON 1 KEY OVER "
+ TABLE_NAME));
+ }
+ }
+
+ @Test
+ public void testRVCOffsetWithNotApplicableAndPointLookup() throws
Exception {
Review Comment:
is this test applicable to this PR?
--
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]