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

Kazuaki Ishizaki commented on SPARK-15678:
------------------------------------------

Sorry for being late to reply.

According to the comment of {{refreshByPath()}}, I think that it should work by 
calling {{refreshByPath()}} once.
{quote}
   Invalidate and refresh all the cached data (and the associated metadata) for 
any dataframe that
   contains the given data source path. Path matching is by prefix, i.e. "/" 
would invalidate
   everything that is cached.
{quote}

I think that it is better to create a new JIRA entry. This JIRA entry is not 
for reporting issues of {{refreshByPath()}}.
What do you think?



> Not use cache on appends and overwrites
> ---------------------------------------
>
>                 Key: SPARK-15678
>                 URL: https://issues.apache.org/jira/browse/SPARK-15678
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Sameer Agarwal
>            Assignee: Sameer Agarwal
>             Fix For: 2.0.0
>
>
> SparkSQL currently doesn't drop caches if the underlying data is overwritten.
> {code}
> val dir = "/tmp/test"
> sqlContext.range(1000).write.mode("overwrite").parquet(dir)
> val df = sqlContext.read.parquet(dir).cache()
> df.count() // outputs 1000
> sqlContext.range(10).write.mode("overwrite").parquet(dir)
> sqlContext.read.parquet(dir).count() // outputs 1000 instead of 10 <---- We 
> are still using the cached dataset
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to