Repository navigation
[spark] Describe a partition by its values on every Spark version - #11419
Open
LuciferYang wants to merge 2 commits into
Open
LuciferYang wants to merge 2 commits into
LuciferYang wants to merge 2 commits into
Conversation
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
Closes #11383.
Spark 4.2 (SPARK-39660) plans
DESCRIBE ... PARTITIONasDescribeTablePartition, whichPaimonStrategydoes not match, so on 4.2 and 4.3 Spark's own exec prints the rawloadPartitionMetadatamap. Before 4.2,PaimonDescribeTableExecmatches spec strings against the catalog's partition names, so blank, NULL, DATE, TIMESTAMP andm = '09'partitions report "Found 0 matching partitions".This PR resolves the spec by value on every version, and a 4.2-module strategy sends
DescribeTablePartitiontoPaimonDescribeTableExec. Statistics come from the table's own scan of the partition columns, forSHOW TABLE EXTENDED ... PARTITIONtoo.Behavior changes before 4.2:
DESCRIBEfails on a missing partition too.= NULL, not= '__DEFAULT_PARTITION__'.On every version, fallback branch, time travel,
scan.bucketand query auth apply as in a read.Tests
DescribeTableTestBase: lookup by value (blank vs NULL, an upper-case column name, the default partition name, a missing partition), INT/DATE/TIMESTAMP/BINARY values, a DV table whose files are all at level 0, a partition only the fallback branch holds (DESCRIBEandSHOW), session time travel, andt$audit_log.UnreportedPartitionStatisticsTest: the fixture injects unknown statistics throughloadPartitionMetadatainstead of the catalog listing.SparkPartitionMetadataAuthTest: a user granted only the partition columns can describe a partition.paimon-spark-4.2now runsDescribeTableTestandUnreportedPartitionStatisticsTest, so the spark42 and spark43 lanes cover them.