phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #303: PHOENIX-3534 Support multi region SYSTEM.CATALOG ...
Date Wed, 04 Jul 2018 23:19:57 GMT
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/303#discussion_r200207759
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -1957,6 +1968,17 @@ private PTable createTableInternal(CreateTableStatement statement,
byte[][] spli
                     linkStatement.setLong(6, parent.getSequenceNumber());
                     linkStatement.setString(7, PTableType.INDEX.getSerializedValue());
                     linkStatement.execute();
    +                
    +                // Add row linking index table to parent table for indexes on views
    +                if (parent.getType() == PTableType.VIEW) {
    +	                linkStatement = connection.prepareStatement(CREATE_VIEW_INDEX_PARENT_LINK);
    +	                linkStatement.setString(1, tenantIdStr);
    +	                linkStatement.setString(2, schemaName);
    +	                linkStatement.setString(3, tableName);
    +	                linkStatement.setString(4, parent.getName().getString());
    +	                linkStatement.setByte(5, LinkType.VIEW_INDEX_PARENT_TABLE.getSerializedValue());
    +	                linkStatement.execute();
    +                }
    --- End diff --
    
    We need to update MetaDataClient.createTableInternal() to not include the columns from
the parent table in 4.15 so that we can remove the code in MetaDataEndPointImpl that filters
the columns. It's fine to do this in a follow up JIRA, but we should remember to do it.


---

Mime
View raw message