ccciudatu commented on a change in pull request #13572:
URL: https://github.com/apache/beam/pull/13572#discussion_r548432577
##########
File path:
sdks/java/io/thrift/src/main/java/org/apache/beam/sdk/io/thrift/ThriftSchema.java
##########
@@ -286,8 +324,6 @@ T restoreThriftObject(Class<?> targetClass, Object[]
params) {
actualValue = value;
}
thrift.setFieldValue(field, actualValue);
- } else if (!TUnion.class.isInstance(thrift)) {
- thrift.setFieldValue(field, value); // nullness checks don't allow
setting null here
Review comment:
This seemed like a good idea at the time, as it prevented null values in
the beam row from ending up as fields with default values in thrift (in case
defaults were provided in the thrift descriptor), so it seemed closer to a
"symmetrical" transformation.
However, leaving the fields unset when they're null in the source row is
both safer and more natural.
----------------------------------------------------------------
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]