LuciferYang opened a new issue, #13993:
URL: https://github.com/apache/gravitino/issues/13993
### Version
main branch
### Describe what's wrong
HMS escapes special characters in partition names (control characters and `"
# % ' * / : = ? \ { [ ] ^` and DEL), and `HiveTableConverter` returns names in
that form. `HivePartition` builds names by plain concatenation and parses them
by plain splitting, so the two sides disagree for any value that contains one
of these characters:
- Adding a partition with `ds='a/b'` builds the name `ds=a/b`, which splits
into two values, and fails.
- A partition with `ds='x=y'` is created, but the name Gravitino returns for
it, `ds=x%3Dy`, cannot be loaded, and `dropPartition` returns false for it.
- Partitions created by Spark or Hive with such values cannot be loaded or
dropped through Gravitino at all.
The Spark connector builds and parses partition names the same way, so
`ALTER TABLE ... DROP PARTITION` and `SHOW PARTITIONS` are affected too.
### Error message and/or stacktrace
`getPartition("ds=x%3Dy")` throws `NoSuchPartitionException`, and
`dropPartition("ds=x%3Dy")` returns false.
### How to reproduce
1. In a Hive catalog, create a table partitioned by a string column `ds`.
2. Add a partition with value `x=y`.
3. `listPartitionNames()` returns `ds=x%3Dy`; `getPartition("ds=x%3Dy")`
fails and `dropPartition("ds=x%3Dy")` returns false.
### Additional context
_No response_
--
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]