Skip to content

Commit

Permalink
[MINOR][SQL] Add prettyName for current_database function
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?
Added a `prettyname` for current_database function.

## How was this patch tested?
Manually.

Before:
```
scala> sql("select current_database()").show
+-----------------+
|currentdatabase()|
+-----------------+
|          default|
+-----------------+
```

After:
```
scala> sql("select current_database()").show
+------------------+
|current_database()|
+------------------+
|           default|
+------------------+
```

Author: Weiqing Yang <[email protected]>

Closes #15506 from weiqingy/prettyName.

(cherry picked from commit 56b0f5f)
Signed-off-by: Reynold Xin <[email protected]>
  • Loading branch information
weiqingy authored and rxin committed Oct 17, 2016
1 parent 3cc2fe5 commit ca66f52
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,5 @@ case class CurrentDatabase() extends LeafExpression with Unevaluable {
override def dataType: DataType = StringType
override def foldable: Boolean = true
override def nullable: Boolean = false
override def prettyName: String = "current_database"
}

0 comments on commit ca66f52

Please sign in to comment.