Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address comments and fix PySpark test
  • Loading branch information
Eric5553 committed Feb 27, 2020
commit e9022a108bdca888b6bad358c25645473d8a98b8
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ abstract class SparkStrategies extends QueryPlanner[SparkPlan] {

def createCartesianProduct() = {
if (joinType.isInstanceOf[InnerLike]) {
Some(Seq(joins.CartesianProductExec(
planLater(left), planLater(right), condition)))
Some(Seq(joins.CartesianProductExec(planLater(left), planLater(right), condition)))
} else {
None
}
Expand Down Expand Up @@ -368,8 +367,7 @@ abstract class SparkStrategies extends QueryPlanner[SparkPlan] {

def createCartesianProduct() = {
if (joinType.isInstanceOf[InnerLike]) {
Some(Seq(joins.CartesianProductExec(
planLater(left), planLater(right), condition)))
Some(Seq(joins.CartesianProductExec(planLater(left), planLater(right), condition)))
} else {
None
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import org.apache.spark.sql.execution.{BinaryExecNode, ExplainUtils}
trait BaseJoinExec extends BinaryExecNode {
def joinType: JoinType
def condition: Option[Expression]
def leftKeys: Seq[Expression]
def rightKeys: Seq[Expression]

override def simpleStringWithNodeId(): String = {
val opId = ExplainUtils.getOpId(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ case class BroadcastNestedLoopJoinExec(
joinType: JoinType,
condition: Option[Expression]) extends BaseJoinExec {

override def leftKeys: Seq[Expression] = Nil
override def rightKeys: Seq[Expression] = Nil

override lazy val metrics = Map(
"numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output rows"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ case class CartesianProductExec(
left: SparkPlan,
right: SparkPlan,
condition: Option[Expression]) extends BaseJoinExec {

override def joinType: JoinType = Inner
override def leftKeys: Seq[Expression] = Nil
override def rightKeys: Seq[Expression] = Nil

override def output: Seq[Attribute] = left.output ++ right.output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import org.apache.spark.sql.execution.metric.SQLMetric
import org.apache.spark.sql.types.{IntegralType, LongType}

trait HashJoin extends BaseJoinExec {
def leftKeys: Seq[Expression]
def rightKeys: Seq[Expression]
def buildSide: BuildSide

override def simpleStringWithNodeId(): String = {
Expand Down