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

    https://github.com/apache/phoenix/pull/34#discussion_r23118093
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java 
---
    @@ -361,7 +362,8 @@ protected ColumnRef resolveColumn(ColumnParseNode node) 
throws SQLException {
             // Disallow explicit reference to salting column, tenant ID 
column, and index ID column
             if (pkPosition >= 0) {
                 boolean isSalted = table.getBucketNum() != null;
    -            boolean isMultiTenant = context.getConnection().getTenantId() 
!= null && table.isMultiTenant();
    +            boolean isMultiTenant = context.getConnection()==null ? 
table.isMultiTenant() :
    --- End diff --
    
    When I parse expressions in IndexMaintainer (line 331), I first use 
SQLParser.parseCondition to create a parse node and then create an 
ExpressionCompiler and create the expression.
     At this point, I don't have access to a connection so I set it to null. 
The connection was only being used to get the tenant id. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to