aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorYin Huai <huai@cse.ohio-state.edu>2014-07-15 14:06:45 -0700
committerMichael Armbrust <michael@databricks.com>2014-07-15 14:06:45 -0700
commit8af46d58464b96471825ce376c3e11c8b1108c0e (patch)
tree6e69891f4e775427fd9ed4391cd4dd0b59b1ddc8 /project
parentbcd0c30c7eea4c50301cb732c733fdf4d4142060 (diff)
downloadspark-8af46d58464b96471825ce376c3e11c8b1108c0e.tar.gz
spark-8af46d58464b96471825ce376c3e11c8b1108c0e.tar.bz2
spark-8af46d58464b96471825ce376c3e11c8b1108c0e.zip
[SPARK-2474][SQL] For a registered table in OverrideCatalog, the Analyzer failed to resolve references in the format of "tableName.fieldName"
Please refer to JIRA (https://issues.apache.org/jira/browse/SPARK-2474) for how to reproduce the problem and my understanding of the root cause. Author: Yin Huai <huai@cse.ohio-state.edu> Closes #1406 from yhuai/SPARK-2474 and squashes the following commits: 96b1627 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2474 af36d65 [Yin Huai] Fix comment. be86ba9 [Yin Huai] Correct SQL console settings. c43ad00 [Yin Huai] Wrap the relation in a Subquery named by the table name in OverrideCatalog.lookupRelation. a5c2145 [Yin Huai] Support sql/console.
Diffstat (limited to 'project')
-rw-r--r--project/SparkBuild.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 754d54e893..5461d25d72 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -166,6 +166,9 @@ object SparkBuild extends PomBuild {
/* Enable unidoc only for the root spark project */
enable(Unidoc.settings)(spark)
+ /* Spark SQL Core console settings */
+ enable(SQL.settings)(sql)
+
/* Hive console settings */
enable(Hive.settings)(hive)
@@ -179,6 +182,27 @@ object SparkBuild extends PomBuild {
}
+object SQL {
+
+ lazy val settings = Seq(
+
+ initialCommands in console :=
+ """
+ |import org.apache.spark.sql.catalyst.analysis._
+ |import org.apache.spark.sql.catalyst.dsl._
+ |import org.apache.spark.sql.catalyst.errors._
+ |import org.apache.spark.sql.catalyst.expressions._
+ |import org.apache.spark.sql.catalyst.plans.logical._
+ |import org.apache.spark.sql.catalyst.rules._
+ |import org.apache.spark.sql.catalyst.types._
+ |import org.apache.spark.sql.catalyst.util._
+ |import org.apache.spark.sql.execution
+ |import org.apache.spark.sql.test.TestSQLContext._
+ |import org.apache.spark.sql.parquet.ParquetTestData""".stripMargin
+ )
+
+}
+
object Hive {
lazy val settings = Seq(