[ 
https://issues.apache.org/jira/browse/BEAM-9894?focusedWorklogId=438697&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-438697
 ]

ASF GitHub Bot logged work on BEAM-9894:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/May/20 12:03
            Start Date: 29/May/20 12:03
    Worklog Time Spent: 10m 
      Work Description: purbanow commented on a change in pull request #11794:
URL: https://github.com/apache/beam/pull/11794#discussion_r432437111



##########
File path: 
sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeIO.java
##########
@@ -339,10 +360,31 @@
       emptyCollection
           .apply(Wait.on(output))
           .apply(ParDo.of(new CleanTmpFilesFromGcsFn(stagingBucketDir)));
-
       return output;
     }
 
+    private void checkArguments(Location loc) {
+      // Either table or query is required. If query is present, it's being 
used, table is used
+      // otherwise
+      checkArgument(loc != null, "via() is required");
+      checkArgument(
+          loc.getStorageIntegrationName() != null,

Review comment:
       I think keeping this part of code in separate method makes code more 
readable. 
   
   I agree with you about that `is odd -- the loc configuration is passed as a 
parameter while all the rest of the configurations are accessed as methods`
   
   I changed `checkArguments` method  to stop  accepting location as argument. 
WDYT?
   
   Yes , `storageIntegrationName` must not be null . Thanks for spotting this 
:) 
   
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 438697)
    Time Spent: 4h  (was: 3h 50m)

> Add batch SnowflakeIO.Write to Java SDK
> ---------------------------------------
>
>                 Key: BEAM-9894
>                 URL: https://issues.apache.org/jira/browse/BEAM-9894
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-ideas
>            Reporter: Dariusz Aniszewski
>            Assignee: Pawel Urbanowicz
>            Priority: P2
>          Time Spent: 4h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to