File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2 Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,18 @@ case class DescribeNamespaceExec(
43
43
val metadata = catalog.loadNamespaceMetadata(ns)
44
44
45
45
rows += toCatalystRow(" Namespace Name" , ns.last)
46
- rows += toCatalystRow(" Description" , metadata.get(PROP_COMMENT ))
47
- rows += toCatalystRow(" Location" , metadata.get(PROP_LOCATION ))
48
- rows += toCatalystRow(" Owner Name" , metadata.getOrDefault(PROP_OWNER_NAME , " " ))
49
- rows += toCatalystRow(" Owner Type" , metadata.getOrDefault(PROP_OWNER_TYPE , " " ))
46
+ Option (metadata.get(PROP_COMMENT )).foreach {
47
+ rows += toCatalystRow(" Description" , _)
48
+ }
49
+ Option (metadata.get(PROP_LOCATION )).foreach {
50
+ rows += toCatalystRow(" Location" , _)
51
+ }
52
+ Option (metadata.get(PROP_OWNER_NAME )).foreach {
53
+ rows += toCatalystRow(" Owner Name" , _)
54
+ }
55
+ Option (metadata.get(PROP_OWNER_TYPE )).foreach {
56
+ rows += toCatalystRow(" Owner Type" , _)
57
+ }
50
58
51
59
if (isExtended) {
52
60
val properties = metadata.asScala -- RESERVED_PROPERTIES .asScala
You can’t perform that action at this time.
0 commit comments