Skip to content

Commit 49f19b9

Browse files
adrian-wangrxin
authored andcommitted
[MINOR] change new Exception to IllegalArgumentException
Author: Daoyuan Wang <[email protected]> Closes apache#6434 from adrian-wang/joinerr and squashes the following commits: ee1b64f [Daoyuan Wang] break line f7c53e9 [Daoyuan Wang] to IllegalArgumentException f8dea2d [Daoyuan Wang] sys.err to IllegalStateException be82259 [Daoyuan Wang] change new exception to sys.err
1 parent 149d1b2 commit 49f19b9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashOuterJoin.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ case class HashOuterJoin(
4848
case LeftOuter => left.outputPartitioning
4949
case RightOuter => right.outputPartitioning
5050
case FullOuter => UnknownPartitioning(left.outputPartitioning.numPartitions)
51-
case x => throw new Exception(s"HashOuterJoin should not take $x as the JoinType")
51+
case x =>
52+
throw new IllegalArgumentException(s"HashOuterJoin should not take $x as the JoinType")
5253
}
5354

5455
override def requiredChildDistribution: Seq[ClusteredDistribution] =
@@ -63,7 +64,7 @@ case class HashOuterJoin(
6364
case FullOuter =>
6465
left.output.map(_.withNullability(true)) ++ right.output.map(_.withNullability(true))
6566
case x =>
66-
throw new Exception(s"HashOuterJoin should not take $x as the JoinType")
67+
throw new IllegalArgumentException(s"HashOuterJoin should not take $x as the JoinType")
6768
}
6869
}
6970

@@ -216,7 +217,8 @@ case class HashOuterJoin(
216217
rightHashTable.getOrElse(key, EMPTY_LIST), joinedRow)
217218
}
218219

219-
case x => throw new Exception(s"HashOuterJoin should not take $x as the JoinType")
220+
case x =>
221+
throw new IllegalArgumentException(s"HashOuterJoin should not take $x as the JoinType")
220222
}
221223
}
222224
}

0 commit comments

Comments
 (0)