yittg commented on a change in pull request #3681:
URL: https://github.com/apache/iceberg/pull/3681#discussion_r815695622
##########
File path:
flink/v1.13/flink/src/main/java/org/apache/iceberg/flink/TypeToFlinkType.java
##########
@@ -108,10 +108,10 @@ public LogicalType primitive(Type.PrimitiveType
primitive) {
Types.TimestampType timestamp = (Types.TimestampType) primitive;
if (timestamp.shouldAdjustToUTC()) {
// MICROS
- return new LocalZonedTimestampType(6);
+ return new LocalZonedTimestampType(3);
Review comment:
Yes, we should not change it here. It can be checked outside.
##########
File path:
flink/v1.13/flink/src/main/java/org/apache/iceberg/flink/FlinkSchemaUtil.java
##########
@@ -149,14 +158,44 @@ public static TableSchema toSchema(RowType rowType) {
* @param schema iceberg schema to convert.
* @return Flink TableSchema.
*/
- public static TableSchema toSchema(Schema schema) {
+ public static TableSchema toSchema(Schema schema, Map<String, String>
properties) {
TableSchema.Builder builder = TableSchema.builder();
// Add columns.
for (RowType.RowField field : convert(schema).getFields()) {
builder.field(field.getName(),
TypeConversions.fromLogicalToDataType(field.getType()));
}
+ // Add watermark
+ final int watermarkCount =
Review comment:
We can check if a column is used as watermark column, and add its field
type as TIMESTAMP(3)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]