Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.1, 3.1.0, 3.2.0
Description
Here is the example to reproduce the issue:
spark-sql> create table tbl (col int, part int) using parquet partitioned by (part); spark-sql> insert into tbl partition (part=0) select 0; spark-sql> cache table tbl; spark-sql> select * from tbl; 0 0 spark-sql> show table extended like 'tbl' partition(part=0); default tbl false Partition Values: [part=0] Location: file:/Users/maximgekk/proj/recover-partitions-refresh-cache/spark-warehouse/tbl/part=0 ...
Add new partition by copying the existing one:
cp -r /Users/maximgekk/proj/recover-partitions-refresh-cache/spark-warehouse/tbl/part=0 /Users/maximgekk/proj/recover-partitions-refresh-cache/spark-warehouse/tbl/part=1
Recover and select the table:
spark-sql> alter table tbl recover partitions; spark-sql> select * from tbl; 0 0
We see only old data.
Attachments
Issue Links
- is a clone of
-
SPARK-34011 ALTER TABLE .. RENAME TO PARTITION doesn't refresh cache
- Resolved
- is cloned by
-
SPARK-34055 ALTER TABLE .. ADD PARTITION doesn't refresh cache
- Resolved
- links to
(5 links to)