[ 
https://issues.apache.org/jira/browse/PHOENIX-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584417#comment-14584417
 ] 

Maryann Xue commented on PHOENIX-1812:
--------------------------------------

[~jamestaylor] Ah, yes, you are right. This is due to PHOENIX-1489. And the 
"$1" is the temporary position based PTable instead of the physical one, but 
only uses the same table name so that full column names can stay the same. I 
think the fix I mentioned in the last comment does make sense for both non-join 
cases and join cases:
{code}
        // Don't pass groupBy when building where clause expression, because we 
do not want to wrap these
        // expressions as group by key expressions since they're pre, not post 
filtered.
        if (innerPlan == null && !tableRef.equals(resolver.getTables().get(0))) 
{
-            context.setResolver(FromCompiler.getResolverForQuery(select, 
this.statement.getConnection()));
+            context.setResolver(FromCompiler.getResolver(tableRef));
        }
{code}
This means that we have already resolved the table once and have got the 
TableRef as of that timestamp, and now we want to recover the ColumnResolver 
with this TableRef without having to resolve the table again with an even newer 
timestamp.
I had intended to include this change in the PHOENIX-1489 check-in but forgot 
to do so after hitting an issue in one of the integration tests. I remember the 
issue was related to doing a query after changing the metadata, and I believe 
it was just another issue exposed by this change. I can re-run the tests and 
find the exact failed test case.


> Only sync table metadata when necessary
> ---------------------------------------
>
>                 Key: PHOENIX-1812
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1812
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>         Attachments: PHOENIX-1812.patch, PHOENIX-1812.patch
>
>
> With transactions, we hold the timestamp at the point when the transaction 
> was opened. We can prevent the MetaDataEndpoint getTable RPC in 
> MetaDataClient.updateCache() to check that the client has the latest table if 
> we've already checked at the current transaction ID timestamp. We can keep 
> track of which tables we've already updated in PhoenixConnection.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to