You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/14 07:32:56 UTC

[GitHub] [flink-table-store] zjureel opened a new pull request, #378: [FLINK-30013] Add check update column type

zjureel opened a new pull request, #378:
URL: https://github.com/apache/flink-table-store/pull/378

   Check the source and target column types in `SchemaManager` to avoid data type conversion failures when reading data


-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] JingsongLi merged pull request #378: [FLINK-30013] Add check update column type

Posted by GitBox <gi...@apache.org>.
JingsongLi merged PR #378:
URL: https://github.com/apache/flink-table-store/pull/378


-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #378: [FLINK-30013] Add check update column type

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on code in PR #378:
URL: https://github.com/apache/flink-table-store/pull/378#discussion_r1021166499


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -201,6 +203,12 @@ public TableSchema commitChanges(List<SchemaChange> changes) throws Exception {
                                 DataType newType =
                                         TableSchema.toDataType(
                                                 update.newLogicalType(), new AtomicInteger(0));
+                                checkState(
+                                        LogicalTypeCasts.supportsImplicitCast(
+                                                field.type().logicalType, update.newLogicalType()),
+                                        String.format(
+                                                "Row type %s cannot be converted to %s without loosing information.",

Review Comment:
   Could this add the field name in the message which is convenient for users to check which field type is incorrect?



-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #378: [FLINK-30013] Add check update column type

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on code in PR #378:
URL: https://github.com/apache/flink-table-store/pull/378#discussion_r1021177345


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -201,6 +203,12 @@ public TableSchema commitChanges(List<SchemaChange> changes) throws Exception {
                                 DataType newType =
                                         TableSchema.toDataType(
                                                 update.newLogicalType(), new AtomicInteger(0));
+                                checkState(

Review Comment:
   The behavior which check the implicit cast could move before line 202. If the implicit cast fails, no need to get the new type. 



-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #378: [FLINK-30013] Add check update column type

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on code in PR #378:
URL: https://github.com/apache/flink-table-store/pull/378#discussion_r1021177345


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -201,6 +203,12 @@ public TableSchema commitChanges(List<SchemaChange> changes) throws Exception {
                                 DataType newType =
                                         TableSchema.toDataType(
                                                 update.newLogicalType(), new AtomicInteger(0));
+                                checkState(

Review Comment:
   The behavior which check the implicit cast could move before line 202.



-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] zjureel commented on a diff in pull request #378: [FLINK-30013] Add check update column type

Posted by GitBox <gi...@apache.org>.
zjureel commented on code in PR #378:
URL: https://github.com/apache/flink-table-store/pull/378#discussion_r1021279033


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -201,6 +203,12 @@ public TableSchema commitChanges(List<SchemaChange> changes) throws Exception {
                                 DataType newType =
                                         TableSchema.toDataType(
                                                 update.newLogicalType(), new AtomicInteger(0));
+                                checkState(

Review Comment:
   Done



-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org