purbanow commented on a change in pull request #12618:
URL: https://github.com/apache/beam/pull/12618#discussion_r481966807
##########
File path:
sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeIO.java
##########
@@ -1623,4 +1867,12 @@ public DataSourceConfiguration getConfig() {
return this.config;
}
}
+
+ private static String getValueOrNull(ValueProvider<String> valueProvider) {
+ return valueProvider != null ? valueProvider.get() : null;
+ }
+
+ private static boolean isNotEmpty(ValueProvider<String> valueProvider) {
+ return valueProvider != null && valueProvider.get() != null &&
!valueProvider.get().isEmpty();
Review comment:
No, it will not throw any exception. We tested it as simple jobs and as
templates.
JAVA syntax is working in the way that `valueProvider.get() != nul`l is
never going to be call if `valueProvider != null ` returns false .
In terms of using valueProvider.isAccessible(), I think, it is a good idea
as it will replace `valueProvider != null && valueProvider.get() != null` . I
will tested it :)
----------------------------------------------------------------
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]