You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/09/03 20:38:45 UTC

[jira] [Resolved] (SPARK-10290) Spark can register temp table and hive table with the same table name

     [ https://issues.apache.org/jira/browse/SPARK-10290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Armbrust resolved SPARK-10290.
--------------------------------------
    Resolution: Not A Problem

This is by design.  If you want to query the hive table then you should use the fully qualfied name (including the database).

> Spark can register temp table and hive table with the same table name
> ---------------------------------------------------------------------
>
>                 Key: SPARK-10290
>                 URL: https://issues.apache.org/jira/browse/SPARK-10290
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.4.1
>            Reporter: pin_zhang
>
> Spark sql allow to create hive table and register temp table with the same name
> no way to run query on the hive table table with the following code
> // register hive table
> DataFrame df = hctx_.read().json("test.json");
> df.write().mode(SaveMode.Overwrite).saveAsTable("test");
>  // register temp table
> hctx_.registerDataFrameAsTable(hctx_.sql("select id from test"), "test");
> 		



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org