Commit a91cbd3
[SPARK-19218][SC-6086] SET -v should not cause a NPE when a configuration uses NULL as its default value
This is a backport of apache@c4a6519
#### What changes were proposed in this pull request?
This PR aims to fix the following two things:
1. `sql("SET -v").collect()` or `sql("SET -v").show()` throws a NullPointerException when a String configuration with default value `null` has been defined.
2. Currently, `SET` and `SET -v` commands show unsorted result. This PR sorts the result.
## How was this patch tested?
Added a regression test to SQLQuerySuite.
Author: Herman van Hovell <[email protected]>
Author: Dongjoon Hyun <[email protected]>
Closes apache#265 from hvanhovell/SPARK-19218.1 parent 964256e commit a91cbd3
File tree
2 files changed
+31
-3
lines changed- sql/core/src
- main/scala/org/apache/spark/sql/execution/command
- test/scala/org/apache/spark/sql
2 files changed
+31
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
988 | 1015 | | |
989 | 1016 | | |
990 | 1017 | | |
| |||
0 commit comments