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

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

                Author: ASF GitHub Bot
            Created on: 05/Feb/21 09:59
            Start Date: 05/Feb/21 09:59
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #1286:
URL: https://github.com/apache/hive/pull/1286#discussion_r570340192



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
##########
@@ -654,11 +655,18 @@ public static String findTableColNameOf(Operator<?> 
start, String internalColNam
         continue;
       }
       // If columnName is the output of a ColumnExpr get the original 
columnName from the Expr Map
-      if (currentOp.getColumnExprMap() != null && 
currentOp.getColumnExprMap().containsKey(internalColName)
-              && currentOp.getColumnExprMap().get(internalColName) instanceof 
ExprNodeColumnDesc) {
-        internalColName = ((ExprNodeColumnDesc) 
currentOp.getColumnExprMap().get(internalColName)).getColumn();
+      if (currentOp.getColumnExprMap() != null && 
currentOp.getColumnExprMap().containsKey(internalColName)) {
+        // Only use colInfo that is ExprNodeColumnDesc (could even be a UDF on 
the key at this point)
+        if (currentOp.getColumnExprMap().get(internalColName) instanceof 
ExprNodeColumnDesc) {
+          internalColName = ((ExprNodeColumnDesc) 
currentOp.getColumnExprMap().get(internalColName)).getColumn();
+          keyColInfo = currentOp.getSchema().getColumnInfo(internalColName);

Review comment:
       Thanks for the comments @kgyrtkirk ! Updated the PR to make use of 
backtracking logic -- had to update it a bit to branch-out in a multi-parent 
scenario. Let me know what you think

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
##########
@@ -654,11 +655,18 @@ public static String findTableColNameOf(Operator<?> 
start, String internalColNam
         continue;
       }
       // If columnName is the output of a ColumnExpr get the original 
columnName from the Expr Map
-      if (currentOp.getColumnExprMap() != null && 
currentOp.getColumnExprMap().containsKey(internalColName)
-              && currentOp.getColumnExprMap().get(internalColName) instanceof 
ExprNodeColumnDesc) {
-        internalColName = ((ExprNodeColumnDesc) 
currentOp.getColumnExprMap().get(internalColName)).getColumn();
+      if (currentOp.getColumnExprMap() != null && 
currentOp.getColumnExprMap().containsKey(internalColName)) {
+        // Only use colInfo that is ExprNodeColumnDesc (could even be a UDF on 
the key at this point)
+        if (currentOp.getColumnExprMap().get(internalColName) instanceof 
ExprNodeColumnDesc) {
+          internalColName = ((ExprNodeColumnDesc) 
currentOp.getColumnExprMap().get(internalColName)).getColumn();
+          keyColInfo = currentOp.getSchema().getColumnInfo(internalColName);

Review comment:
       Thanks for the comments @kgyrtkirk ! Updated the PR to make use of 
backtracking logic -- had to update it a bit to branch-out in a multi-parent 
scenario (I believe this is the right thing to do in any case, unless you want 
to bail out early). Let me know what you think




----------------------------------------------------------------
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: 548245)
    Time Spent: 2h 10m  (was: 2h)

> Compiler should skip MJ keyExpr for probe optimization
> ------------------------------------------------------
>
>                 Key: HIVE-23882
>                 URL: https://issues.apache.org/jira/browse/HIVE-23882
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Panagiotis Garefalakis
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> In probe we cannot currently support Key expressions (on the big table Side) 
> as ORC CVs Probe directly the smalltable HT (there is no expr evaluation at 
> that level).
> TezCompiler should take this into account when picking MJs to push probe 
> details



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

Reply via email to