-
- Downloads
[SPARK-14668][SQL] Move CurrentDatabase to Catalyst
## What changes were proposed in this pull request? This PR moves `CurrentDatabase` from sql/hive package to sql/catalyst. It also adds the function description, which looks like the following. ``` scala> sqlContext.sql("describe function extended current_database").collect.foreach(println) [Function: current_database] [Class: org.apache.spark.sql.execution.command.CurrentDatabase] [Usage: current_database() - Returns the current database.] [Extended Usage: > SELECT current_database()] ``` ## How was this patch tested? Existing tests Author: Yin Huai <yhuai@databricks.com> Closes #12424 from yhuai/SPARK-14668.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala 1 addition, 0 deletions...apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala 12 additions, 0 deletions...cala/org/apache/spark/sql/catalyst/expressions/misc.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala 21 additions, 3 deletions...a/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerExtendableSuite.scala 6 additions, 1 deletion...ark/sql/catalyst/optimizer/OptimizerExtendableSuite.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkOptimizer.scala 6 additions, 1 deletion...scala/org/apache/spark/sql/execution/SparkOptimizer.scala
- sql/core/src/main/scala/org/apache/spark/sql/internal/SessionState.scala 1 addition, 1 deletion...in/scala/org/apache/spark/sql/internal/SessionState.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala 0 additions, 18 deletions...rc/main/scala/org/apache/spark/sql/hive/HiveContext.scala
Loading
Please register or sign in to comment