[spark] Describe a partition by its values on every Spark version #11419
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 266 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #11419"
general
weight: 0.35
LuciferYang
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 to catalog 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. DESCRIBE also finds a partition registered in a REST catalog before its first write.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 microsecond value for a millisecond timestamp column, a DV table whose files are all at level 0, a partition only the fallback branch holds (DESCRIBEandSHOW), session time travel, andt$audit_log.DescribeRegisteredPartitionTest: on the REST test server, a partition registered throughCatalog.createPartitionsbefore its first write can be described, except under time travel.UnreportedPartitionStatisticsTest: the fixture injects unknown statistics throughloadPartitionMetadatainstead of the catalog listing.SparkPartitionMetadataAuthTest: a user granted only the partition columns can describe a partition, also of ametastore.partitioned-tabletable outside a REST catalog.paimon-spark-4.2now runsDescribeTableTest,DescribeRegisteredPartitionTestandUnreportedPartitionStatisticsTest, so the spark42 and spark43 lanes cover them.