[ https://issues.apache.org/jira/browse/HIVE-24231?focusedWorklogId=499948&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-499948 ]
ASF GitHub Bot logged work on HIVE-24231: ----------------------------------------- Author: ASF GitHub Bot Created on: 13/Oct/20 09:40 Start Date: 13/Oct/20 09:40 Worklog Time Spent: 10m Work Description: kgyrtkirk commented on a change in pull request #1553: URL: https://github.com/apache/hive/pull/1553#discussion_r503812132 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java ########## @@ -386,125 +456,81 @@ public boolean sharedWorkOptimization(ParseContext pctx, SharedWorkOptimizerCach LOG.debug("Merging subtree starting at {} into subtree starting at {}", discardableTsOp, retainableTsOp); } else { - ExprNodeDesc newRetainableTsFilterExpr = null; - List<ExprNodeDesc> semijoinExprNodes = new ArrayList<>(); - if (retainableTsOp.getConf().getFilterExpr() != null) { - // Gather SJ expressions and normal expressions - List<ExprNodeDesc> allExprNodesExceptSemijoin = new ArrayList<>(); - splitExpressions(retainableTsOp.getConf().getFilterExpr(), - allExprNodesExceptSemijoin, semijoinExprNodes); - // Create new expressions - if (allExprNodesExceptSemijoin.size() > 1) { - newRetainableTsFilterExpr = ExprNodeGenericFuncDesc.newInstance( - new GenericUDFOPAnd(), allExprNodesExceptSemijoin); - } else if (allExprNodesExceptSemijoin.size() > 0 && - allExprNodesExceptSemijoin.get(0) instanceof ExprNodeGenericFuncDesc) { - newRetainableTsFilterExpr = allExprNodesExceptSemijoin.get(0); - } - // Push filter on top of children for retainable - pushFilterToTopOfTableScan(optimizerCache, retainableTsOp); + + if (sr.discardableOps.size() > 1) { + throw new RuntimeException("we can't discard more in this path"); Review comment: there could be a few things which could go south here - one is that pushing filters out from the discardable ts will most likely not work as desired. I feel tempted to remove this multi operator matching stuff in HIVE-24241 - because that approach is much simpler; more separated from merging of the operators. ---------------------------------------------------------------- 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: 499948) Time Spent: 1h (was: 50m) > Enhance shared work optimizer to merge scans with filters on both sides > ----------------------------------------------------------------------- > > Key: HIVE-24231 > URL: https://issues.apache.org/jira/browse/HIVE-24231 > Project: Hive > Issue Type: Improvement > Reporter: Zoltan Haindrich > Assignee: Zoltan Haindrich > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)