spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-9689) Cache doesn't refresh for HadoopFsRelation based table
Date Fri, 07 Aug 2015 05:45:46 GMT

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

Apache Spark reassigned SPARK-9689:
-----------------------------------

    Assignee:     (was: Apache Spark)

> Cache doesn't refresh for HadoopFsRelation based table
> ------------------------------------------------------
>
>                 Key: SPARK-9689
>                 URL: https://issues.apache.org/jira/browse/SPARK-9689
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Cheng Hao
>
> {code:title=example|borderStyle=solid}
>     // create a HadoopFsRelation based table
>     sql(s"""
>         |CREATE TEMPORARY TABLE jsonTable (a int, b string)
>         |USING org.apache.spark.sql.json.DefaultSource
>         |OPTIONS (
>         |  path '${path.toString}'
>         |)""".stripMargin)
>   
>     // give the value from table jt
>     sql(
>       s"""
>       |INSERT OVERWRITE TABLE jsonTable SELECT a, b FROM jt
>     """.stripMargin)
>     // cache the HadoopFsRelation Table
>     sqlContext.cacheTable("jsonTable")
>    
>     // update the HadoopFsRelation Table
>     sql(
>       s"""
>         |INSERT OVERWRITE TABLE jsonTable SELECT a * 2, b FROM jt
>       """.stripMargin)
>     // Even this will fail
>      sql("SELECT a, b FROM jsonTable").collect()
>     // This will fail, as the cache doesn't refresh
>     checkAnswer(
>       sql("SELECT a, b FROM jsonTable"),
>       sql("SELECT a * 2, b FROM jt").collect())
> {code}



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


Mime
View raw message