You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/09 02:04:25 UTC
[GitHub] [iceberg] rdblue commented on a diff in pull request #4865: Docs: add flink and iceberg type compatibility
rdblue commented on code in PR #4865:
URL: https://github.com/apache/iceberg/pull/4865#discussion_r893005955
##########
docs/flink/flink-getting-started.md:
##########
@@ -547,6 +547,70 @@ RewriteDataFilesActionResult result = Actions.forTable(table)
For more doc about options of the rewrite files action, please see [RewriteDataFilesAction](../../../javadoc/{{% icebergVersion %}}/org/apache/iceberg/flink/actions/RewriteDataFilesAction.html)
+## Type conversion
+
+Iceberg's integration for Flink automatically converts between Flink and Iceberg types. When writing to a table with types that are not supported by Flink, like UUID, Iceberg will accept and convert values from the Flink type.
+
+### Flink to Iceberg
+
+Flink types are converted to Iceberg types according to the following table:
+
+| Flink | Iceberg | Notes |
+|----------------- |----------------------------|---------------|
+| boolean | boolean | |
+| tinyint | integer | |
+| smallint | integer | |
+| integer | integer | |
+| bigint | long | |
+| float | float | |
+| double | double | |
+| char | string | |
+| varchar | string | |
+| string | string | |
+| binary | binary | |
+| varbinary | fixed | |
+| decimal | decimal | |
+| date | date | |
+| time | time | |
+| timestamp | timestamp without timezone | |
+| timestamp_ltz | timestamp with timezone | |
+| array | list | |
+| map | map | |
+| multiset | map | |
+| row | struct | |
+| raw | | Not supported |
+| interval | | Not supported |
+| structured | | Not supported |
+| timestamp with zone | | Not supported |
+| distinct | | Not supported |
+| null | | Not supported |
+| symbol | | Not supported |
+| logical | | Not supported |
+
+### Iceberg to Flink
+
+Iceberg types are converted to Flink types according to the following table:
+
+| Iceberg | Flink | Notes |
+|----------------------------|---------------|--------------------------------------------------|
+| boolean | boolean | |
+| struct | row | |
+| list | array | |
+| map | map | |
+| integer | integer | |
+| long | bigint | |
+| float | float | |
+| double | double | |
+| date | date | |
+| time | time | |
+| timestamp without timezone | timestamp | precision is fixed at 6 |
+| timestamp with timezone | timestamp_ltz | precision is fixed at 6 |
+| string | varchar | length is fixed at 2<sup>31</sup>-1 |
Review Comment:
Why not use `varchar[2147483647]`?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org