Imfuyuwei commented on a change in pull request #12436:
URL: https://github.com/apache/beam/pull/12436#discussion_r477580621
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/schema/BeamTableUtils.java
##########
@@ -151,10 +151,16 @@ public static Object autoCastField(Schema.Field field,
Object rawObj) {
case INT32:
return Integer.valueOf(raw);
case INT64:
+ if (raw.equals("")) {
+ return null;
Review comment:
Yes, data in format of CSV files are read by this autoCastField method
and converted to various types.
When input data field is empty, it needs to be treated as NULL manually,
otherwise it will cause error.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]