pabloem commented on a change in pull request #12147:
URL: https://github.com/apache/beam/pull/12147#discussion_r456185984
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/JsonToRow.java
##########
@@ -91,6 +92,7 @@
static class JsonToRowFn extends PTransform<PCollection<String>,
PCollection<Row>> {
private transient volatile @Nullable ObjectMapper objectMapper;
private Schema schema;
+ private volatile NullBehavior nullBehavior =
NullBehavior.ACCEPT_MISSING_OR_NULL;
Review comment:
Why is this volatile? Can you make it `private final` and add it to the
constructor? So each instance is immutable
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/JsonToRow.java
##########
@@ -91,6 +92,7 @@
static class JsonToRowFn extends PTransform<PCollection<String>,
PCollection<Row>> {
private transient volatile @Nullable ObjectMapper objectMapper;
private Schema schema;
+ private volatile NullBehavior nullBehavior =
NullBehavior.ACCEPT_MISSING_OR_NULL;
Review comment:
Perhaps the schema should also be final.
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/JsonToRow.java
##########
@@ -91,6 +92,7 @@
static class JsonToRowFn extends PTransform<PCollection<String>,
PCollection<Row>> {
Review comment:
Can you please add javadoc for the default null behavior?
----------------------------------------------------------------
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]