voonhous commented on code in PR #17599:
URL: https://github.com/apache/hudi/pull/17599#discussion_r2643582770
##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/index/TestHoodieIndexUtils.java:
##########
@@ -227,32 +218,31 @@ public void testValidateDataTypeForSecondaryIndex() {
@Test
public void testValidateDataTypeForSecondaryIndexWithLogicalTypes() {
// Supported logical types
- Schema timestampMillis =
LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG));
- Schema timestampMicros =
LogicalTypes.timestampMicros().addToSchema(Schema.create(Schema.Type.LONG));
- Schema date =
LogicalTypes.date().addToSchema(Schema.create(Schema.Type.INT));
- Schema timeMillis =
LogicalTypes.timeMillis().addToSchema(Schema.create(Schema.Type.INT));
- Schema timeMicros =
LogicalTypes.timeMicros().addToSchema(Schema.create(Schema.Type.LONG));
-
+ HoodieSchema timestampMillis = HoodieSchema.createTimestampMillis();
+ HoodieSchema timestampMicros = HoodieSchema.createTimestampMicros();
+ HoodieSchema date = HoodieSchema.createDate();
+ HoodieSchema timeMillis = HoodieSchema.createTimeMillis();
+ HoodieSchema timeMicros = HoodieSchema.createTimeMicros();
+
// Unsupported logical types
- Schema decimal = LogicalTypes.decimal(10,
2).addToSchema(Schema.create(Schema.Type.BYTES));
- Schema uuid =
LogicalTypes.uuid().addToSchema(Schema.create(Schema.Type.STRING));
- Schema localTimestampMillis =
LogicalTypes.localTimestampMillis().addToSchema(Schema.create(Schema.Type.LONG));
- Schema localTimestampMicros =
LogicalTypes.localTimestampMicros().addToSchema(Schema.create(Schema.Type.LONG));
Review Comment:
@the-other-tim-brown Original tests where it expects local-timestamp to be
unsupported.
--
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]