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

Dongjoon Hyun commented on SPARK-34039:
---------------------------------------

[~csun]. I tested with Apache Spark 3.1.0 RC1 with Iceberg 0.10. This is a bug 
with a correctness bug. I'll convert this to bug. Please make a backport please.

{code}
spark-sql> SELECT * FROM local.db.table;
4       5

spark-sql> CACHE TABLE v AS SELECT * FROM local.db.table;

spark-sql> SELECT * FROM v;
4       5

spark-sql> REPLACE TABLE local.db.table AS SELECT 100 id, '100' string;

spark-sql> SELECT * FROM v;
4       5

spark-sql> SELECT * FROM local.db.table;
100     100
{code}

> [DSv2] ReplaceTable should invalidate cache
> -------------------------------------------
>
>                 Key: SPARK-34039
>                 URL: https://issues.apache.org/jira/browse/SPARK-34039
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Minor
>             Fix For: 3.2.0
>
>
> Similar to SPARK-33492, which handles the {{ReplaceTableAsSelect}} case, we 
> should also invalidate table cache in {{ReplaceTable}} v2 command.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to