You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2019/12/12 04:38:00 UTC

[jira] [Commented] (SPARK-30123) PartitionPruning should consider more case

    [ https://issues.apache.org/jira/browse/SPARK-30123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994175#comment-16994175 ] 

Hyukjin Kwon commented on SPARK-30123:
--------------------------------------

[~deshanxiao] can you show the plan generated from the actual codes? Also please fix the JIRA title to be more specific.

> PartitionPruning should consider more case
> ------------------------------------------
>
>                 Key: SPARK-30123
>                 URL: https://issues.apache.org/jira/browse/SPARK-30123
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: deshanxiao
>            Priority: Major
>
> If left has partitionScan and right has PruningFilter but hasBenefit is false. The right will never be added a SubQuery.
> {code:java}
>             var partScan = getPartitionTableScan(l, left)
>             if (partScan.isDefined && canPruneLeft(joinType) &&
>                 hasPartitionPruningFilter(right)) {
>               val hasBenefit = pruningHasBenefit(l, partScan.get, r, right)
>               newLeft = insertPredicate(l, newLeft, r, right, rightKeys, hasBenefit)
>             } else {
>               partScan = getPartitionTableScan(r, right)
>               if (partScan.isDefined && canPruneRight(joinType) &&
>                   hasPartitionPruningFilter(left) ) {
>                 val hasBenefit = pruningHasBenefit(r, partScan.get, l, left)
>                 newRight = insertPredicate(r, newRight, l, left, leftKeys, hasBenefit)
>               }
>             }
>           case _ =>
>         }
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org