-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
The following ScalaTest test case
test("merge primitive types") {
val expected =
Types.buildMessage()
.addField(
Types
.required(INT32)
.as(DECIMAL)
.precision(7)
.scale(2)
.named("f"))
.named("root")
assert(expected.union(expected) === expected)
}produces the following assertion error
message root {
required int32 f;
}
did not equal message root {
required int32 f (DECIMAL(9,0));
}
This is because PrimitiveType.union doesn't handle original type properly. An open question is that, can two primitive types with the same primitive type name but different original types be unioned?
Reporter: Cheng Lian / @liancheng
Assignee: Cheng Lian / @liancheng
Related issues:
- Release Parquet-mr 1.9.0 (blocks)
- PrimitiveType.union accepts fixed_len_byte_array fields with different lengths when strict mode is on (is related to)
- GroupType.union() doesn't merge the original type (is related to)
PRs and other links:
Note: This issue was originally created as PARQUET-379. Please see the migration documentation for further details.