Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.11.0
-
None
Description
If rowtime attribute references a regular field, derive format schema from table schema may get error result:
Schema schema = new Schema() .field("f1", DataTypes.STRING()) .field("f2", DataTypes.BIGINT()).from("t") .field("r", DataTypes.TIMESTAMP(3)) .rowtime( new Rowtime().timestampsFromField("t").watermarksPeriodicBounded(3)); final Map<String, String> properties = schema.toProperties(); final TableSchema actualSchema = TableFormatFactoryBase.deriveSchema(properties);
this code snippet will result in `ValidationException("Field names must be unique. Duplicate field: '" + fullFieldName + "'")`, but the excepted result should be:
final TableSchema expectedSchema = TableSchema.builder() .field("f1", Types.STRING) .field("t", Types.LONG) .build();
Attachments
Issue Links
- links to