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 <yangweiqing001@gmail.com>

Closes #15506 from weiqingy/prettyName.
  • Loading branch information
weiqingy authored and rxin committed Oct 17, 2016
1 parent e18d02c commit 56b0f5f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ 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"
}

/**
Expand Down

0 comments on commit 56b0f5f

Please sign in to comment.