Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7417#discussion_r38590589
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/CartesianProduct.scala
 ---
    @@ -27,16 +27,27 @@ import org.apache.spark.sql.execution.{BinaryNode, 
SparkPlan}
      * :: DeveloperApi ::
      */
     @DeveloperApi
    -case class CartesianProduct(left: SparkPlan, right: SparkPlan) extends 
BinaryNode {
    +case class CartesianProduct(
    +    left: SparkPlan,
    +    right: SparkPlan,
    +    buildSide: BuildSide) extends BinaryNode {
       override def output: Seq[Attribute] = left.output ++ right.output
     
    +  private val (small, big) = buildSide match {
    +    case BuildRight => (left, right)
    +    case BuildLeft => (right, left)
    +  }
    +
       protected override def doExecute(): RDD[InternalRow] = {
    -    val leftResults = left.execute().map(_.copy())
    -    val rightResults = right.execute().map(_.copy())
    +    val leftResults = small.execute().map(_.copy())
    +    val rightResults = big.execute().map(_.copy())
    --- End diff --
    
    Sorry, just realized that we can't use zipPartition here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to