pvary commented on a change in pull request #2701:
URL: https://github.com/apache/iceberg/pull/2701#discussion_r657741776
##########
File path:
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergPartitionTextParser.java
##########
@@ -134,6 +151,18 @@ public void textMixedTransforms() {
.identity("employee_info.employer")
.build();
Assert.assertEquals(expected, HiveIcebergPartitionTextParser.fromText(
- SCHEMA, "day(created)|bucket(16,id)|employee_info.employer"));
+ SCHEMA, "day(created)|bucket(16,id)|employee_info.employer",
+ InputFormatConfig.PARTITIONING_DELIMITER_DEFAULT));
+ }
+
+ @Test
+ public void testNonDefaultDelimiter() {
+ Schema schema = new Schema(
+ optional(1, "i|d", Types.LongType.get()),
+ optional(2, "na,me", Types.StringType.get()));
+ PartitionSpec expected = PartitionSpec.builderFor(schema)
+ .bucket("i|d", 16).alwaysNull("na,me").build();
+ Assert.assertEquals(expected, HiveIcebergPartitionTextParser.fromText(
+ schema, "bucket(16,i|d);alwaysNull(na,me)", ";"));
Review comment:
what happens in this case:
```
Schema schema = new Schema(
optional(1, "i,d", Types.LongType.get()),
optional(2, "na|me", Types.StringType.get()));
PartitionSpec expected = PartitionSpec.builderFor(schema)
.bucket("i,d", 16).alwaysNull("na|me").build();
Assert.assertEquals(expected, HiveIcebergPartitionTextParser.fromText(
schema, "bucket(16,i,d);alwaysNull(na|me)", ";"));
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]