Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-6424 SELECT cf1.* FAILS with a WHERE clause including cf2. - #1177
Conversation
stoty
commented
Mar 22, 2021
💔 -1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
+1, left one minor comment if you would like to include multiple cols
| } else { | ||
| // cannot use EncodedQualifiersColumnProjectionFilter in this case | ||
| // since there's an unknown set of qualifiers (cf.*) | ||
| trackedColumnsBitset = null; |
There was a problem hiding this comment.
Yeah I think this makes sense, and hopefully should work for multiple filters too. Shall we add one more test to cover multiple cols and filters? Something likeSELECT w.*, x.* FROM tableName WHERE y.v2='xyz' and z.v3='abc' ?
There was a problem hiding this comment.
Yeah... Lemme add that test and then merge.
Thanks @virajjasani
lhofhansl
commented
Mar 22, 2021
I'll also check the test failure. |
lhofhansl
commented
Mar 22, 2021
Actually... When I add local indexes into the mix it still fails for another reason. I'll look into that as well. If it's an easy fix I'll add it here otherwise I'll file another jira. |
lhofhansl
commented
Mar 22, 2021
Added more tests as @virajjasani suggested. Also added local indexes to the test, and included an additional fix for local indexes. |
| * Disabling this optimization for tables with more than one column family. | ||
| * See PHOENIX-3890. | ||
| */ | ||
| return !scan.isRaw() && table.getColumnFamilies().size() <= 1 && table.getImmutableStorageScheme() != null |
There was a problem hiding this comment.
This inadvertently caught local indexes too (which have 0 column families declared in their table definition)
lhofhansl
commented
Mar 22, 2021
Expanded the test slightly to also do a CF.* from a column family with an indexed column. |
stoty
commented
Mar 22, 2021
💔 -1 overall
This message was automatically generated. |
lhofhansl
commented
Mar 22, 2021
Last test run still looks good. |
stoty
commented
Mar 22, 2021
💔 -1 overall
This message was automatically generated. |
lhofhansl
commented
Mar 23, 2021
Thanks @virajjasani |
See Jira. In the SELECT CF1.* WHERE CF2.C ... cannot use the EncodedQualifiersColumnProjectionFilter since the number of qualifiers is not know (so the trackcolumns Bitset cannot be build ahead of time).