mxm commented on code in PR #13072:
URL: https://github.com/apache/iceberg/pull/13072#discussion_r2115922995
##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/FlinkSchemaUtil.java:
##########
@@ -192,7 +222,9 @@ public static Type convert(LogicalType flinkType) {
*
* @param rowType a RowType
* @return Flink TableSchema
+ * @deprecated use {@link #toResolvedSchema(RowType)} instead
*/
+ @Deprecated
public static TableSchema toSchema(RowType rowType) {
Review Comment:
The official way to go about this is to create a Flink `Schema` first, then
use a `SchemaResolver` (e.g. `DefaultSchemaResolver`) to resolve the schema to
create `ResolvedSchema`. If you use `DefaultSchemaResolver`, validation will be
performed.
The default resolver is available through
`TableEnvironment#getCatalogManager().getSchemaResolver()`. If you cannot
obtain it, then I suggest adding any necessary validation in a utility (like
you suggested).
--
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]