-
Notifications
You must be signed in to change notification settings - Fork 3k
Add TypeToFlinkType: convert iceberg types to Flink types #1174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // The conversion is not a 1:1 mapping, so we just check iceberg types. | ||
| Assert.assertEquals( | ||
| icebergSchema.asStruct(), | ||
| FlinkSchemaUtil.convert(FlinkSchemaUtil.toSchema(FlinkSchemaUtil.convert(icebergSchema))).asStruct()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to provide some separate unit tests to address the conversion differences ( so that we won't regress).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add tests for the conversion differences.
|
@JingsongLi, I added some comments about the changes here to #1182. |
884e7b4 to
ab99a29
Compare
|
Synchronized with #1182. |
flink/src/main/java/org/apache/iceberg/flink/FlinkSchemaUtil.java
Outdated
Show resolved
Hide resolved
ab99a29 to
814672b
Compare
|
Thanks for rebasing! CI has been fixed in master so I reopened this to run tests. They are passing, so I'll merge. |
Converter between Flink types and Iceberg type.
The conversion is not a 1:1 mapping that not allows back-and-forth conversion. So some information might get lost during the back-and-forth conversion.
(background: FlinkCatalog need convert iceberg tables to Flink tables)