You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2019/06/01 01:09:00 UTC

[jira] [Updated] (HIVE-21818) CBO: Copying TableRelOptHiveTable has metastore traffic

     [ https://issues.apache.org/jira/browse/HIVE-21818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gopal V updated HIVE-21818:
---------------------------
    Component/s: CBO

> CBO: Copying TableRelOptHiveTable has metastore traffic
> -------------------------------------------------------
>
>                 Key: HIVE-21818
>                 URL: https://issues.apache.org/jira/browse/HIVE-21818
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Gopal V
>            Priority: Major
>
> While the optimizer is running, whenever it makes a copy of the TableScan to perform potential rewrites, there is Hive metastore traffic from inside CBO optimizer.
> {code}
>   public RelOptHiveTable(RelOptSchema calciteSchema, RelDataTypeFactory typeFactory, List<String> qualifiedTblName,
>       RelDataType rowType, Table hiveTblMetadata, List<ColumnInfo> hiveNonPartitionCols,
>       List<ColumnInfo> hivePartitionCols, List<VirtualColumn> hiveVirtualCols, HiveConf hconf,
>       Map<String, PrunedPartitionList> partitionCache, Map<String, ColumnStatsList> colStatsCache,
>       AtomicInteger noColsMissingStats) { ....
>     Pair<List<ImmutableBitSet>, List<ImmutableBitSet>> constraintKeys = generateKeys();
>     this.keys = constraintKeys.left;
>     this.nonNullablekeys = constraintKeys.right;
>     this.referentialConstraints = generateReferentialConstraints();
> }
> {code}
> This is triggered from the rules as the partition pruner
> {code}
>   protected void perform(RelOptRuleCall call, Filter filter,
>       HiveTableScan tScan) {
>     // Original table
>     RelOptHiveTable hiveTable = (RelOptHiveTable) tScan.getTable();
>     // Copy original table scan and table
>     HiveTableScan tScanCopy = tScan.copyIncludingTable(tScan.getRowType());
>     RelOptHiveTable hiveTableCopy = (RelOptHiveTable) tScanCopy.getTable();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)