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

James Taylor commented on PHOENIX-1271:
---------------------------------------

Actually scratch the ORDER BY idea, because the tenant ID column may not be the 
first column, but it will be the first PK column. You can just filter the 
column with a KEY_SEQ = 1 and add KEY_SEQ to the end of the select list for the 
getColumns query. It stores the PK ordinal position.

> Column metadata doesn't hide tenant column on tenant-specific connections.
> --------------------------------------------------------------------------
>
>                 Key: PHOENIX-1271
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1271
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Karel Vervaeke
>         Attachments: PHOENIX-1271.patch, TenantColumnFilteringResultSet.java
>
>
> connection.getMetaData().getColumns(...) always returns all columns.
> For multi-tenant tables it would make more sense if the first PK (the 
> tenant-id column) would be excluded. If we do this the number of columns 
> returned would match the number of columns you get when executing a "select 
> *" query.



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

Reply via email to