hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-21818) CBO: Copying TableRelOptHiveTable has metastore traffic
Date Thu, 06 Jun 2019 21:07:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-21818?focusedWorklogId=255442&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-255442
]

ASF GitHub Bot logged work on HIVE-21818:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jun/19 21:06
            Start Date: 06/Jun/19 21:06
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #663: HIVE-21818
URL: https://github.com/apache/hive/pull/663#discussion_r291371794
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
 ##########
 @@ -2105,7 +2105,13 @@ private void getMetaData(QB qb, ReadEntity parentInput)
       Table tab = getTableObjectByName(tabName, false);
       if (tab != null) {
         // do a deep copy, in case downstream changes it.
 
 Review comment:
   The constraints are not deep copied though, you are right. Those should not change in any
case; I will change the comment accordingly.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 255442)
    Time Spent: 1h 50m  (was: 1h 40m)

> 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
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21818.01.patch, HIVE-21818.02.patch, HIVE-21818.03.patch, HIVE-21818.04.patch,
HIVE-21818.04.patch, HIVE-21818.05.patch, HIVE-21818.05.patch, HIVE-21818.05.patch, HIVE-21818.patch
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> 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();
> ...
>     if (StringUtils.equals(hiveTableCopy.getPartitionListKey(), hiveTable.getPartitionListKey()))
{
>       // Nothing changed, we do not need to produce a new expression
>       return;
>     }
> {code}



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

Mime
View raw message