Github user JeffreyLyonsD2L commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/104#discussion_r36590856
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java ---
    @@ -204,8 +204,18 @@ public final ResultIterator iterator(final List<? 
extends SQLCloseable> dependen
             } else {
                 ScanUtil.setTimeRange(scan, context.getScanTimeRange());
             }
    -        
    -        ScanUtil.setTenantId(scan, connection.getTenantId() == null ? null 
: connection.getTenantId().getBytes());
    +        byte[] tenantIdBytes;
    --- End diff --
    
    In both cases we are getting it from the connection. In the if {} block we 
are using the table to figure out the RowKeySchema so we know what to convert 
it into.
    
    The else might be unnecessary, I leaned towards keeping it in because then 
it mimicked the old behaviour in the case where you were scanning a regular 
table on a tenant-specific connection.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to