Add "full_outer" name to join types#17985
Add "full_outer" name to join types#17985BartekH wants to merge 6 commits intoapache:masterfrom BartekH:patch-1
Conversation
I have discovered that "full_outer" name option is working in Spark 2.0, but it is not printed in exception. Please verify.
|
"full_outer" will be replaced by "fullouter" after |
| def apply(typ: String): JoinType = typ.toLowerCase(Locale.ROOT).replace("_", "") match { | ||
| case "inner" => Inner | ||
| case "outer" | "full" | "fullouter" => FullOuter | ||
| case "outer" | "full" | "fullouter" | "full_outer" => FullOuter |
There was a problem hiding this comment.
as @wzhfy points out, given that we remove underscores, this matching case is unnecessary. The same is true for left_outer, right_outer and left_semi.
|
That's ok, but "full_outer" is invisible in exception information. Please consider add it, because is is possible to use "full_outer". When wrong name of join option is provided and exception occurs, there is no information about "full_outer" option. It's a little bit misleading. |
|
@BartekH Yes, we can add that to exception message. Please also add a test case for checking supported join types. |
|
Ping @BartekH, how is it going? |
|
pull request for JoinTypes tests has been created here: #18219 |
tests for JoinType object
add Apache license on the top of file
|
Could we just fold the changes in 18219 to here? |
|
@HyukjinKwon Done. |
| class JoinTypesTest extends SparkFunSuite { | ||
|
|
||
| test("construct an Inner type") { | ||
| assert(JoinType.apply("inner") === Inner) |
There was a problem hiding this comment.
nit: can just have JoinType("...") here and below. Also, can we have a test that checks for the correct exception for wrong join types? Something along the lines of:
val ex = intercept[IllegalArgumentException] {
JoinType.apply("wrong_join")
}
ex.getMessage() should contain "..."|
ok to test |
|
Test build #77823 has finished for PR 17985 at commit
|
|
Test build #78787 has started for PR 17985 at commit |
|
Please rerun jenkins job. |
|
retest this please |
|
Test build #79071 has finished for PR 17985 at commit
|
|
It has failed again. It's not my fault, please retest it one more time. |
|
retest this please |
1 similar comment
|
retest this please |
|
Test build #79126 has finished for PR 17985 at commit
|
|
Does your Jenkins work properly? It failed again, and again cause is different. |
|
test this please |
|
retest this please |
|
Test build #80296 has finished for PR 17985 at commit
|
|
retest this please |
|
Test build #80310 has finished for PR 17985 at commit
|
|
LGTM |
|
Thanks! Merging to master. |
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.