Skip to content

Commit ec34f65

Browse files
committed
Update timestamp validation assertions
1 parent 537e92f commit ec34f65

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎parquet-arrow/src/test/java/org/apache/parquet/arrow/schema/TestSchemaConverter.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ public void testParquetInt32TimestampMillisToArrow() {
649649
.named("a"))
650650
.named("root")))
651651
.isInstanceOf(IllegalStateException.class)
652-
.hasMessage("TIMESTAMP(MILLIS,false) can only annotate [INT64]");
652+
.hasMessage("TIMESTAMP(MILLIS,false) can only annotate [INT64, FIXED_LEN_BYTE_ARRAY(12)]");
653653
}
654654

655655
@Test
@@ -660,6 +660,6 @@ public void testParquetInt32TimestampMicrosToArrow() {
660660
.named("a"))
661661
.named("root")))
662662
.isInstanceOf(IllegalStateException.class)
663-
.hasMessage("TIMESTAMP(MICROS,false) can only annotate [INT64]");
663+
.hasMessage("TIMESTAMP(MICROS,false) can only annotate [INT64, FIXED_LEN_BYTE_ARRAY(12)]");
664664
}
665665
}

‎parquet-column/src/test/java/org/apache/parquet/schema/TestTypeBuildersWithLogicalTypes.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,14 @@ public void testTimestampAnnotationsRejectInvalidTypes() {
359359
for (PrimitiveTypeName type : invalidTypes) {
360360
assertThatThrownBy(() -> Types.required(type).as(logicalType).named("col"))
361361
.isInstanceOf(IllegalStateException.class)
362-
.hasMessage(logicalType + " can only annotate INT64 or FIXED_LEN_BYTE_ARRAY(12)");
362+
.hasMessage(logicalType + " can only annotate [INT64, FIXED_LEN_BYTE_ARRAY(12)]");
363363
}
364364
assertThatThrownBy(() -> Types.required(FIXED_LEN_BYTE_ARRAY)
365365
.length(1)
366366
.as(logicalType)
367367
.named("col"))
368368
.isInstanceOf(IllegalStateException.class)
369-
.hasMessage(logicalType + " can only annotate INT64 or FIXED_LEN_BYTE_ARRAY(12)");
369+
.hasMessage(logicalType + " can only annotate [INT64, FIXED_LEN_BYTE_ARRAY(12)]");
370370
}
371371
}
372372

0 commit comments

Comments
 (0)