Skip to content
Snippets Groups Projects
Commit 438c3815 authored by BartekH's avatar BartekH Committed by Xiao Li
Browse files

Add "full_outer" name to join types

I have discovered that "full_outer" name option is working in Spark 2.0, but it is not printed in exception. Please verify.

## What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)

## How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: BartekH <bartekhamielec@gmail.com>

Closes #17985 from BartekH/patch-1.
parent 55aa4da2
No related branches found
No related tags found
No related merge requests found
......@@ -33,11 +33,11 @@ object JoinType {
case _ =>
val supported = Seq(
"inner",
"outer", "full", "fullouter",
"leftouter", "left",
"rightouter", "right",
"leftsemi",
"leftanti",
"outer", "full", "fullouter", "full_outer",
"leftouter", "left", "left_outer",
"rightouter", "right", "right_outer",
"leftsemi", "left_semi",
"leftanti", "left_anti",
"cross")
throw new IllegalArgumentException(s"Unsupported join type '$typ'. " +
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.sql.catalyst.plans
import org.apache.spark.SparkFunSuite
class JoinTypesTest extends SparkFunSuite {
test("construct an Inner type") {
assert(JoinType("inner") === Inner)
}
test("construct a FullOuter type") {
assert(JoinType("fullouter") === FullOuter)
assert(JoinType("full_outer") === FullOuter)
assert(JoinType("outer") === FullOuter)
assert(JoinType("full") === FullOuter)
}
test("construct a LeftOuter type") {
assert(JoinType("leftouter") === LeftOuter)
assert(JoinType("left_outer") === LeftOuter)
assert(JoinType("left") === LeftOuter)
}
test("construct a RightOuter type") {
assert(JoinType("rightouter") === RightOuter)
assert(JoinType("right_outer") === RightOuter)
assert(JoinType("right") === RightOuter)
}
test("construct a LeftSemi type") {
assert(JoinType("leftsemi") === LeftSemi)
assert(JoinType("left_semi") === LeftSemi)
}
test("construct a LeftAnti type") {
assert(JoinType("leftanti") === LeftAnti)
assert(JoinType("left_anti") === LeftAnti)
}
test("construct a Cross type") {
assert(JoinType("cross") === Cross)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment