apache / iceberg

Apache Iceberg
https://iceberg.apache.org/
Apache License 2.0
6.44k stars 2.23k forks source link

FlinkSchemaUtil.toSchema should return Schema or ResolvedSchema instead of deprecated TableSchema #10950

Open alexmorley opened 2 months ago

alexmorley commented 2 months ago

Feature Request / Improvement

https://github.com/apache/iceberg/blob/a49202773520072fef7457e0056c37f43e9f9d1b/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/FlinkSchemaUtil.java#L208C17-L208C28

TableSchema has been deprecated for some time and most useful manipulation in Flink Java API requires a ResolvedSchema.

I think we have all the info in Iceberg Schema required to generate a ResolvedSchema but there may be some caveats.

Happy to pick this up if folks agree.

Query engine

Flink

Willingness to contribute

pvary commented 2 months ago

Hi @alexmorley, I think I did try to solve this myself some time ago, and found some non-trivial blockers. Sadly, it was so long time ago, that I don't remember what was the issue. Maybe it is solved already.

I would be happy to help and review.

Thanks, Peter