diff options
author | Reynold Xin <rxin@databricks.com> | 2015-05-11 17:02:11 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-05-11 17:02:11 -0700 |
commit | 4f4dbb030c208caba18f314a1ef1751696627d26 (patch) | |
tree | 8972809f5d99a12a53c625cf893c2c3b2b2605c4 /sql/catalyst | |
parent | 91dc3dfd77126afbb894a783b7201b87b59f73cb (diff) | |
download | spark-4f4dbb030c208caba18f314a1ef1751696627d26.tar.gz spark-4f4dbb030c208caba18f314a1ef1751696627d26.tar.bz2 spark-4f4dbb030c208caba18f314a1ef1751696627d26.zip |
[SQL] Show better error messages for incorrect join types in DataFrames.
As a follow-up to https://github.com/apache/spark/pull/5944
Author: Reynold Xin <rxin@databricks.com>
Closes #6064 from rxin/jointype-better-error and squashes the following commits:
7629bf7 [Reynold Xin] [SQL] Show better error messages for incorrect join types in DataFrames.
Diffstat (limited to 'sql/catalyst')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/joinTypes.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/joinTypes.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/joinTypes.scala index 5dc0539cae..77dec7ca6e 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/joinTypes.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/joinTypes.scala @@ -24,6 +24,16 @@ object JoinType { case "leftouter" | "left" => LeftOuter case "rightouter" | "right" => RightOuter case "leftsemi" => LeftSemi + case _ => + val supported = Seq( + "inner", + "outer", "full", "fullouter", + "leftouter", "left", + "rightouter", "right", + "leftsemi") + + throw new IllegalArgumentException(s"Unsupported join type '$typ'. " + + "Supported join types include: " + supported.mkString("'", "', '", "'") + ".") } } |