Repository navigation
Conversation
A TIMESTAMP(3) spec such as ts='...123999' is not equal at millisecond precision, so TRUNCATE PARTITION and a partial DROP PARTITION must not select the stored .123 partition. Fixes apache#11514. Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes #11514.
TRUNCATE PARTITIONand a partialDROP PARTITIONconverted Spark timestamp specs withDateTimeUtils.truncate, so extra digits that aTIMESTAMP(3)(orTIMESTAMP_LTZ(3)) column cannot store still selected the truncated partition. Example:ts = '2026-01-01 10:00:00.123999'removed the storedts = .123partition.A spec is now kept only when the timestamp is already equal at the column's precision. Trailing zeros still match, because Spark holds microseconds. A full
DROP PARTITIONthat names every partition column already threwNoSuchPartitionsException; a partial spec no longer matches by truncating those extra digits.This does not change Data Evolution (#11513) or the Spark 4.2
DESCRIBE ... PARTITIONwork in #11419.Tests
PaimonPartitionManagementTest: extra digits do not truncate aTIMESTAMP(3)orTIMESTAMP_LTZ(3)partition; a matching millisecond spec still does.DROP PARTITIONwith extra digits leaves every(ts, p)partition; a full spec still throwsNoSuchPartitionsException; a matching prefix still drops the intended partitions.28 tests, 0 failed (Spark 3.5.9).