Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-6400 Do no use local index with uncovered columns in the WHERE clause. - #1158
Conversation
| && (table.getIndexType() == null || table.getIndexType() == IndexType.GLOBAL)) { | ||
| String schemaNameStr = table.getSchemaName()==null?null:table.getSchemaName().getString(); | ||
| String tableNameStr = table.getTableName()==null?null:table.getTableName().getString(); | ||
| throw new ColumnNotFoundException(schemaNameStr, tableNameStr, null, ref.getColumn().getName().getString()); |
There was a problem hiding this comment.
It is not clear how returning ColumnNotFoundException results in skipping a plan. Can we add some comments here for that?
There was a problem hiding this comment.
I just brought that code back from before PHOENIX-5109.
It throws an exception, which is then caught in query enumeration in the optimizing phase and consequently ignores that plan.
Happy to add a comment to that extent.
There was a problem hiding this comment.
Something like, "This exception will be caught in query enumeration in the optimizing phase and consequently the plan will be ignored" as you wrote, will be helpful. I will then approve it. Thanks!
stoty
commented
Mar 3, 2021
💔 -1 overall
This message was automatically generated. |
48404a9 to
92af25dCompare| && (table.getIndexType() == null || table.getIndexType() == IndexType.GLOBAL)) { | ||
| String schemaNameStr = table.getSchemaName()==null?null:table.getSchemaName().getString(); | ||
| String tableNameStr = table.getTableName()==null?null:table.getTableName().getString(); | ||
| throw new ColumnNotFoundException(schemaNameStr, tableNameStr, null, ref.getColumn().getName().getString()); |
stoty
commented
Mar 4, 2021
💔 -1 overall
This message was automatically generated. |
stoty
commented
Mar 4, 2021
💔 -1 overall
This message was automatically generated. |
See long discussion on Jira: https://issues.apache.org/jira/browse/PHOENIX-6400