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

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

                Author: ASF GitHub Bot
            Created on: 17/May/19 00:15
            Start Date: 17/May/19 00:15
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #630: HIVE-21365
URL: https://github.com/apache/hive/pull/630#discussion_r284941789
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveAggregateJoinTransposeRule.java
 ##########
 @@ -63,20 +66,16 @@
  */
 public class HiveAggregateJoinTransposeRule extends AggregateJoinTransposeRule 
{
 
-  /** Extended instance of the rule that can push down aggregate functions. */
-  public static final HiveAggregateJoinTransposeRule INSTANCE =
-      new HiveAggregateJoinTransposeRule(HiveAggregate.class, HiveJoin.class,
-          HiveRelFactories.HIVE_BUILDER, true);
+  private static final Logger LOG = 
LoggerFactory.getLogger(HiveAggregateJoinTransposeRule.class);
 
   private final boolean allowFunctions;
+  private final AtomicInteger noColsMissingStats;
 
 Review comment:
   We have always captured how many columns have missing stats (this is same as 
previous behavior, observe that this variable is coming from CalcitePlanner and 
it is used in other places, e.g., ```RelOptHiveTable``` has a reference to it). 
The change here is that since we trigger all rules using a single planner, we 
cannot capture the stats exception from outside of the rule, and we need to 
rather do it from within the rule logic. That is why it is passed as a 
parameter.
   About AtomicInteger vs other type, I do think this is shared by multiple 
threads indeed, but I suspect this was done because Boolean/Integer are 
immutable, hence instead of passing a reference to the planner and changing the 
object itself, you pass around the AtomicInteger that is not immutable.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 243752)
    Time Spent: 50m  (was: 40m)

> Refactor Hep planner steps in CBO
> ---------------------------------
>
>                 Key: HIVE-21365
>                 URL: https://issues.apache.org/jira/browse/HIVE-21365
>             Project: Hive
>          Issue Type: Improvement
>          Components: CBO
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21365.01.patch, HIVE-21365.01.patch, 
> HIVE-21365.02.patch, HIVE-21365.03.patch, HIVE-21365.03.patch, 
> HIVE-21365.04.patch, HIVE-21365.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Using subprograms to decrease number of planner instantiations and benefit 
> fully from metadata providers caching, among other benefits.



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

Reply via email to