aturoczy commented on code in PR #4395:
URL: https://github.com/apache/hive/pull/4395#discussion_r1221938337


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java:
##########
@@ -319,8 +319,9 @@ private boolean 
disableSemiJoinOptDueToExternalTable(HiveConf conf, TableScanOpe
           if (columnOrigin != null && columnOrigin.op instanceof 
TableScanOperator) {
             // Join key origin has been traced to a table column. Check if the 
table is external.
             TableScanOperator joinKeyTs = (TableScanOperator) columnOrigin.op;
-            if 
(MetaStoreUtils.isExternalTable(joinKeyTs.getConf().getTableMetadata().getTTable()))
 {
-              LOG.debug("Join key {} is from {} which is an external table. 
Disabling semijoin optimization.",
+            if (!StatsUtils.checkCanProvideStats(new 
Table(joinKeyTs.getConf().getTableMetadata().getTTable()))) {
+              LOG.debug("Join key {} is from {} which is an external table and 
also could not provide statistics. " +

Review Comment:
   I know It was in the previous version as well, but inside the { } should not 
be a string for the table name?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to