Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spark] Fix delete with partial non-convertible partition filter #4738

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

Zouxxyy
Copy link
Contributor

@Zouxxyy Zouxxyy commented Dec 19, 2024

Purpose

Currently paimon delete where supports directly dropping partitions when all filters are partition filter. Therefore we can not allow partial success for this filter conversion.

CREATE TABLE T (id INT, p STRING) PARTITIONED BY (p);
INSERT INTO T VALUES (2, '2024-12-16'), (3, '2024-12-17'), (4, '2024-12-18');
DELETE FROM T WHERE p >= date_sub('2024-12-17', 0) AND p < '2024-12-18';
SELECT * FROM T ORDER BY id;

before

+---+----------+
| id|         p|
+---+----------+
|  4|2024-12-18|
+---+----------+

after

+---+----------+
| id|         p|
+---+----------+
|  2|2024-12-16|
|  4|2024-12-18|
+---+----------+

Tests

API and Format

Documentation

@Zouxxyy Zouxxyy changed the title [spark] Fix delete with non-convertible partition filter [spark] Fix delete with partial non-convertible partition filter Dec 19, 2024
@YannByron YannByron merged commit 85c462e into apache:master Dec 20, 2024
12 checks passed
@Zouxxyy Zouxxyy deleted the dev/delete-where branch December 20, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants