LuciferYang commented on code in PR #11226:
URL: https://github.com/apache/paimon/pull/11226#discussion_r4638842817
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonPartitionManagement.scala:
##########
@@ -233,7 +233,8 @@ trait PaimonPartitionManagement extends
SupportsAtomicPartitionManagement with L
case (partitionName, index) =>
val internalRowIndex =
partitionSchema.fieldIndex(partitionName)
val structField = partitionSchema.fields(internalRowIndex)
- Objects.equals(
+ // `deepEquals`: a BINARY partition value is a `byte[]`.
+ Objects.deepEquals(
Review Comment:
Reproduced; the STRING version drops the NULL partition on master too. DROP
and TRUNCATE now carry the typed identifier through: they match the table's
partitions by value, as `listPartitionIdentifiers` does, and remove the matches
by `BinaryRow` with `withOverwriteStaticPartitions`. A Hive table with
`metastore.partitioned-table` is dropped through
`PartitionModification.dropPartitions`, which takes partition names, so there a
value whose name does not parse back is rejected before anything is removed.
The new tests put `' '`, NULL and `'a'` in one table, for BINARY and for
STRING, and check that dropping `' '` leaves the other two. A Hive catalog test
covers the STRING case with and without `metastore.partitioned-table`.
The same spec made `SHOW TABLE EXTENDED ... PARTITION (p = ' ')` show the
NULL partition's statistics; that lookup now matches by value as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]