ahmedabu98 commented on code in PR #30910:
URL: https://github.com/apache/beam/pull/30910#discussion_r1568192720
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/io/iceberg/IcebergIO.java:
##########
@@ -19,73 +19,116 @@
import static org.apache.beam.sdk.util.Preconditions.checkStateNotNull;
+import com.google.auto.value.AutoValue;
+import java.util.Arrays;
+import java.util.List;
import org.apache.beam.sdk.io.Read;
import org.apache.beam.sdk.transforms.PTransform;
import org.apache.beam.sdk.values.PBegin;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.Row;
+import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions;
+import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Predicates;
import org.apache.iceberg.Table;
import org.apache.iceberg.catalog.TableIdentifier;
import org.checkerframework.checker.nullness.qual.Nullable;
public class IcebergIO {
- public static WriteRows writeToDynamicDestinations(
- IcebergCatalogConfig catalog, DynamicDestinations dynamicDestinations) {
- return new WriteRows(catalog, dynamicDestinations);
+ public static WriteRows writeRows(IcebergCatalogConfig catalog) {
Review Comment:
I felt it was more clear, but it's not needed
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/io/iceberg/IcebergIO.java:
##########
@@ -19,73 +19,116 @@
import static org.apache.beam.sdk.util.Preconditions.checkStateNotNull;
+import com.google.auto.value.AutoValue;
+import java.util.Arrays;
+import java.util.List;
import org.apache.beam.sdk.io.Read;
import org.apache.beam.sdk.transforms.PTransform;
import org.apache.beam.sdk.values.PBegin;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.Row;
+import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions;
+import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Predicates;
import org.apache.iceberg.Table;
import org.apache.iceberg.catalog.TableIdentifier;
import org.checkerframework.checker.nullness.qual.Nullable;
public class IcebergIO {
- public static WriteRows writeToDynamicDestinations(
- IcebergCatalogConfig catalog, DynamicDestinations dynamicDestinations) {
- return new WriteRows(catalog, dynamicDestinations);
+ public static WriteRows writeRows(IcebergCatalogConfig catalog) {
+ return new
AutoValue_IcebergIO_WriteRows.Builder().setCatalogConfig(catalog).build();
Review Comment:
WriteRows is abstract so we can't instantiate it with
`WriteRows.Builder()...`
--
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]