You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by twdsilva <gi...@git.apache.org> on 2018/11/02 18:46:23 UTC
[GitHub] phoenix pull request #362: [Phoenix-4841] Filters that uses RVC with pk colu...
Github user twdsilva commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/362#discussion_r226392353
--- Diff: phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java ---
@@ -242,6 +260,12 @@ public static Expression pushKeyExpressionsToScan(StatementContext context, Filt
cnf.add(leftRanges);
clipLeftSpan = 0;
prevSortOrder = sortOrder;
+ // since we have to clip the portion with the same sort order, we can no longer
+ // extract the nodes from the where clause
+ // for eg. for the schema A VARCHAR DESC, B VARCHAR ASC and query WHERE (A,B) < ('a','b')
+ // the range (* - a\xFFb) is converted to (~a-*)(*-b)
+ // so we still need to filter on A,B
--- End diff --
(~a-*) gets pushed to the start row of the scan and then we the filter only includes B, right?
---