You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Aäron (JIRA)" <ji...@apache.org> on 2019/01/18 16:10:00 UTC

[jira] [Created] (SPARK-26663) Cannot query a Hive table with orc files in subdirectories

Aäron created SPARK-26663:
-----------------------------

             Summary: Cannot query a Hive table with orc files in subdirectories
                 Key: SPARK-26663
                 URL: https://issues.apache.org/jira/browse/SPARK-26663
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.4.0
            Reporter: Aäron


Hello,

 

I want to report the following issue (my first one :) )

When I create a table in Hive based on a union all then Spark 2.4 is unable to query this table.

To reproduce:

*Hive 1.2.1*
{code:java}
hive> creat table a(id int);

insert into a values(1);

hive> creat table b(id int);

insert into b values(2);

hive> create table c(id int) as select id from a union all select id from b;
{code}
 

*Spark 2.3.1*

 
{code:java}
scala> spark.table("c").show
+---+
| id|
+---+
| 1|
| 2|
+---+

scala> spark.table("c").count
res5: Long = 2

 {code}
 

*Spark 2.4.0*
{code:java}
scala> spark.table("c").show
19/01/18 17:00:49 WARN HiveMetastoreCatalog: Unable to infer schema for table perftest_be.c from file format ORC (inference mode: INFER_AND_SAVE). Using metastore schema.
+---+
| id|
+---+
+---+


scala> spark.table("c").count
res3: Long = 0
{code}
I did not find an existing issue for this.  Might be important to investigate.

 

Kind regards.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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