[ https://issues.apache.org/jira/browse/PHOENIX-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297560#comment-16297560 ]
James Taylor commented on PHOENIX-4468: --------------------------------------- Thanks for the patch, [~tdsilva]. Here's some comments/questions: - Would you mind adding javadoc to the PhoenixRuntime.getTable() method that explains that if found, it will use the table it finds in the client side cache and *not* check whether the server has a newer one (i.e. different than how a table is resolved when it's referenced in a query)? - Do you think it'd be more clear to let the SQLException bubble up directly when viewName cannot be resolved versus throwing with the original name here? {code} + // resolve the view which should also load any parent indexes + try { + getTable(conn, viewName); + } catch (SQLException e2) { + throw new TableNotFoundException(name); + } {code} - Probably good to file a JIRA for the difference in the way a table is resolved in PhoenixRuntime.getTable() versus in a query (to see if folks feel strongly one way or the other). > Looking up a parent index table of a child view from a different client > fails. > ------------------------------------------------------------------------------- > > Key: PHOENIX-4468 > URL: https://issues.apache.org/jira/browse/PHOENIX-4468 > Project: Phoenix > Issue Type: Bug > Reporter: Thomas D'Silva > Assignee: Thomas D'Silva > Fix For: 4.14.0, 4.13.2 > > Attachments: PHOENIX-4468-4.x-HBase-0.98.patch > > > When you execute a query on a view, phoenix will use any indexes on the base > table that have all the required columns. We create a new PTable based on the > parent table index and tack on the view statement (to ensure we only see rows > that we can access from the view). This PTable is added to the client side > connection metadata cache. This table is not available on the server side (in > SYSTEM.CATALOG). > If you lookup the parent index table from a different client (that never ran > a query on the view), it will fail with a TableNotFoundException. -- This message was sent by Atlassian JIRA (v6.4.14#64029)