ahmedabu98 commented on code in PR #30910:
URL: https://github.com/apache/beam/pull/30910#discussion_r1571613769
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/YamlUtils.java:
##########
@@ -53,19 +53,19 @@ public class YamlUtils {
.put(Schema.TypeName.BYTES, str -> BaseEncoding.base64().decode(str))
.build();
- public static Row toBeamRow(@Nullable String yamlString, Schema schema) {
+ public static @Nullable Row toBeamRow(@Nullable String yamlString, Schema
schema) {
return toBeamRow(yamlString, schema, false);
}
- public static Row toBeamRow(
+ public static @Nullable Row toBeamRow(
@Nullable String yamlString, Schema schema, boolean
convertNamesToCamelCase) {
if (yamlString == null || yamlString.isEmpty()) {
List<Field> requiredFields =
schema.getFields().stream()
.filter(field -> !field.getType().getNullable())
.collect(Collectors.toList());
if (requiredFields.isEmpty()) {
- return Row.nullRow(schema);
+ return null;
Review Comment:
reverted back to null row
--
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]