turb commented on code in PR #38064:
URL: https://github.com/apache/beam/pull/38064#discussion_r3067727869


##########
sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeIO.java:
##########
@@ -424,31 +433,26 @@ public Read<T> withQuotationMark(ValueProvider<String> 
quotationMark) {
     public PCollection<T> expand(PBegin input) {
       checkArguments();
 
-      PCollection<Void> emptyCollection = input.apply(Create.of((Void) null));
       String tmpDirName = makeTmpDirName();
-      PCollection<T> output =
-          emptyCollection
-              .apply(
-                  ParDo.of(
-                      new CopyIntoStageFn(
-                          getDataSourceProviderFn(),
-                          getQuery(),
-                          getTable(),
-                          getStorageIntegrationName(),
-                          getStagingBucketName(),
-                          tmpDirName,
-                          getSnowflakeServices(),
-                          getQuotationMark())))
-              .apply(Reshuffle.viaRandomKey())
-              .apply(FileIO.matchAll())

Review Comment:
   We had issues without useDataStreamForBatch. I'll try again on the updated 
version without it just to be sure. Also we have not tried Flink 2 yet because 
the support is quite recent.
   
   Before the change, it seems Flink does apply reshuffle, but since it reduced 
the number of workers to 1, it's reshuffling... in 1 worker, not changing that 
because the input size (list of files) is tiny.



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

Reply via email to