GitHub user chenghao-intel opened a pull request: https://github.com/apache/spark/pull/3673
[SPARK-4825] [SQL] CTAS fails to resolve when created using saveAsTable Fix bug when query like: ``` test("save join to table") { val testData = sparkContext.parallelize(1 to 10).map(i => TestData(i, i.toString)) sql("CREATE TABLE test1 (key INT, value STRING)") testData.insertInto("test1") sql("CREATE TABLE test2 (key INT, value STRING)") testData.insertInto("test2") testData.insertInto("test2") sql("SELECT COUNT(a.value) FROM test1 a JOIN test2 b ON a.key = b.key").saveAsTable("test") checkAnswer( table("test"), sql("SELECT COUNT(a.value) FROM test1 a JOIN test2 b ON a.key = b.key").collect().toSeq) } ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/chenghao-intel/spark spark_4825 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/3673.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3673 ---- commit e004895d996b4dca84d3e7b7e8586c44bfd7d758 Author: Cheng Hao <hao.ch...@intel.com> Date: 2014-12-11T07:05:36Z fix bug ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org