aokolnychyi commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r608861867



##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Writer.java
##########
@@ -123,6 +123,13 @@
     this.partitionedFanoutEnabled = 
options.getBoolean(SparkWriteOptions.FANOUT_ENABLED, 
tablePartitionedFanoutEnabled);
   }
 
+  protected JavaSparkContext lazySparkContext() {

Review comment:
       W.r.t. lazy, I just copied the old behavior that probably saves an 
instance creation in case if don't get to broadcasting and fail early. It is 
probably be alright to always construct it, I guess. 

##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Writer.java
##########
@@ -123,6 +123,13 @@
     this.partitionedFanoutEnabled = 
options.getBoolean(SparkWriteOptions.FANOUT_ENABLED, 
tablePartitionedFanoutEnabled);
   }
 
+  protected JavaSparkContext lazySparkContext() {

Review comment:
       W.r.t. lazy, I just copied the old behavior that probably saves an 
instance creation in case if don't get to broadcasting and fail early. It is 
probably alright to always construct it, I guess. 




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to