stoty commented on code in PR #1631:
URL: https://github.com/apache/phoenix/pull/1631#discussion_r1235699698
##########
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -369,6 +384,10 @@ private QueryPlan addPlan(PhoenixStatement statement,
SelectStatement select, PT
* otherwise we just don't use this index (as opposed to
trying to join back from
* the index table to the data table.
*/
+ // Reset the state changes from the attempt above
+ indexTableRef.setHinted(false);
Review Comment:
For example we saw
Error: ERROR 504 (42703): Undefined column.
columnName=BILLING_ORDER.0:PERIOD_END (state=42703,code=504)
org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703):
Undefined column. columnName=BILLING_ORDER.0:PERIOD_END
which would refer to the projected data table in the server merge plan, but
the actual Table is unprojected data table in the skip-join-scan, which doesn't
have a column of that name.
Resetting those flags makes sure that we generate and use the correct
projector.
--
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]