You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ravindra Pesala (JIRA)" <ji...@apache.org> on 2014/10/10 20:15:33 UTC

[jira] [Commented] (SPARK-3823) Spark Hive SQL readColumn is not reset each time for a new query

    [ https://issues.apache.org/jira/browse/SPARK-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14167239#comment-14167239 ] 

Ravindra Pesala commented on SPARK-3823:
----------------------------------------

It seems this issue is duplicate of https://issues.apache.org/jira/browse/SPARK-3559

> Spark Hive SQL readColumn is not reset each time for a new query
> ----------------------------------------------------------------
>
>                 Key: SPARK-3823
>                 URL: https://issues.apache.org/jira/browse/SPARK-3823
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.1.0
>            Reporter: Alex Liu
>
> After a few queries running in the same hiveContext, "hive.io.file.readcolumn.ids"" and "hive.io.file.readcolumn.names" values are added on by pre-running queries.
> e.g. running the following querys
> {code}
> hql("use sql_integration_ks")
> val container = hql("select * from double_table as aa JOIN boolean_table as bb on aa.type_id = bb.type_id")
> container.collect().foreach(println)
> val container = hql("select * from ascii_table ORDER BY type_id")
>  container.collect().foreach(println)
> val container = hql("select shippers.shippername, COUNT(orders.orderid) AS numorders FROM orders LEFT JOIN shippers ON orders.shipperid=shippers.shipperid GROUP BY shippername")
>  container.collect().foreach(println)
> val container = hql("select * from ascii_table where type_id > 126")
> container.collect().length
> {code}
> The read column ids for the last query are [2, 0, 3, 1]
> read column names are : type_id,value,type_id,value,type_id,value,orderid,shipperid,shipper name, shipperid
> The source code is at https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScan.scala#L80
> hiveContext has a shared hiveconf which add readColumns for each query. It should be reset each time for a new hive query or remove the duplicate readColumn Ids



--
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