zhongyujiang commented on PR #6662:
URL: https://github.com/apache/paimon/pull/6662#issuecomment-3569932272
> @zhongyujiang Are you referring to the issue of mixing empty strings and
null?
@JingsongLi Is not that the values are "mixed", but that the data with
partition column values equal to an empty string cannot be deleted when using
`DELETE FROM` or `ALTER TABLE T DROP PARTITION`.
Reproduce:
```scala
test("Paimon Partition Management: partition values are empty string") {
spark.sql(s"""
|CREATE TABLE T (pt STRING, data STRING)
|PARTITIONED BY (pt)
|""".stripMargin)
sql("INSERT INTO T VALUES('', 'a'), ('2', 'b')")
sql("ALTER TABLE T DROP PARTITION (pt = '')")
spark.sql("SELECT * FROM T").show(false)
//+---+----+
//|pt |data|
//+---+----+
//|2 |b |
//| |a |
//+---+----+
}
```
> This may be a tricky issue, as Hive's previous definition was to treat
empty strings and null as equivalent.
Oh, I wasn't aware of that. I noticed that Paimon currently places data with
partition values of both null and empty string into the same partition—the
default partition. Is Paimon intended to be consistent with Hive in this
behavior?
--
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]