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

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

                Author: ASF GitHub Bot
            Created on: 08/Apr/20 19:34
            Start Date: 08/Apr/20 19:34
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #952: HIVE-23006 
ProbeDecode compiler support
URL: https://github.com/apache/hive/pull/952#discussion_r405765078
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
 ##########
 @@ -1482,18 +1490,131 @@ private void 
removeSemijoinsParallelToMapJoin(OptimizeTezProcContext procCtx)
         deque.addAll(op.getChildOperators());
       }
     }
+    //  No need to remove SJ branches when we have semi-join reduction or when 
semijoins are enabled for parallel mapjoins.
+    if 
(!procCtx.conf.getBoolVar(ConfVars.TEZ_DYNAMIC_SEMIJOIN_REDUCTION_FOR_MAPJOIN)) 
{
+      if (semijoins.size() > 0) {
+        for (Entry<ReduceSinkOperator, TableScanOperator> semiEntry : 
semijoins.entrySet()) {
+          SemiJoinBranchInfo sjInfo = 
procCtx.parseContext.getRsToSemiJoinBranchInfo().get(semiEntry.getKey());
+          if (sjInfo.getIsHint() || !sjInfo.getShouldRemove()) {
+            // Created by hint, skip it
+            continue;
+          }
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Semijoin optimization with parallel edge to map join. 
Removing semijoin " +
+                OperatorUtils.getOpNamePretty(semiEntry.getKey()) + " - " + 
OperatorUtils.getOpNamePretty(semiEntry.getValue()));
+          }
+          GenTezUtils.removeBranch(semiEntry.getKey());
+          GenTezUtils.removeSemiJoinOperator(procCtx.parseContext, 
semiEntry.getKey(), semiEntry.getValue());
+        }
+      }
+    }
+    if (procCtx.conf.getBoolVar(ConfVars.HIVE_OPTIMIZE_SCAN_PROBEDECODE)) {
+      if (probeDecodeMJoins.size() > 0) {
 
 Review comment:
   The path for `HIVE_OPTIMIZE_SCAN_PROBEDECODE` seems independent from SJ 
optimization. Should we add a mechanism to remove the context for the 
optimization when we think it is not going to be beneficial, e.g., it is not 
filtering any data? Or you think that the cost of checking is negligible and we 
should always apply this optimization? What do you experiments show in the 
worst case scenario? (In any case, this could be tackled in a follow-up but I 
wanted to ask)
 
----------------------------------------------------------------
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: 418820)
    Time Spent: 2h  (was: 1h 50m)

> Compiler support for Probe MapJoin
> ----------------------------------
>
>                 Key: HIVE-23006
>                 URL: https://issues.apache.org/jira/browse/HIVE-23006
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Panagiotis Garefalakis
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-23006.01.patch, HIVE-23006.02.patch
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> The decision of pushing down information to the Record reader (potentially 
> reducing decoding time by row-level filtering) should be done at query 
> compilation time.
> This patch adds an extra optimisation step with the goal of finding Table 
> Scan operators that could reduce the number of rows decoded at runtime using 
> extra available information.
> It currently looks for all the available MapJoin operators that could use the 
> smaller HashTable on the probing side (where TS is) to filter-out rows that 
> would never match. 
> To do so the HashTable information is pushed down to the TS properties and 
> then propagated as part of MapWork.
> If the a single TS is used by multiple operators (shared-word), this rule can 
> not be applied.
> This rule can be extended to support static filter expressions like:
> _select * from sales where sold_state = 'PR';_
> This optimisation manly targets the Tez execution engine running on Llap.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to