TheNeuralBit commented on a change in pull request #16947:
URL: https://github.com/apache/beam/pull/16947#discussion_r833454887



##########
File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/values/AwsPojoRow.java
##########
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.values;
+
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toMap;
+import static 
org.apache.beam.sdk.io.aws2.schemas.AwsPojoSchema.CACHE_IDX_OPTION;
+import static 
org.apache.beam.sdk.io.aws2.schemas.AwsPojoSchema.CACHE_SIZE_OPTION;
+import static software.amazon.awssdk.core.protocol.MarshallingType.LIST;
+import static software.amazon.awssdk.core.protocol.MarshallingType.MAP;
+import static software.amazon.awssdk.core.protocol.MarshallingType.SDK_POJO;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.function.Function;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.Schema.Field;
+import org.apache.beam.sdk.schemas.Schema.FieldType;
+import org.apache.commons.lang3.ArrayUtils;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import software.amazon.awssdk.core.SdkField;
+import software.amazon.awssdk.core.SdkPojo;
+import software.amazon.awssdk.core.protocol.MarshallingType;
+import software.amazon.awssdk.core.traits.ListTrait;
+import software.amazon.awssdk.core.traits.MapTrait;
+
+/**
+ * A row delegating to an underlying AWS {@link SdkPojo}.
+ *
+ * <p>This is following the example of {@link RowWithGetters}, but optimized 
for usage with {@link
+ * SdkPojo}s.

Review comment:
       Could you summarize what are the gaps in `RowWithGetters` that you need 
to address with this implementation? I'm wondering if these are fixes we should 
apply in  `RowWithGetters` instead of creating an alternate version.
   
   It's worth taking the time to enumerate them - if we really do need to fork 
`RowWithGetters` in this way, I think we should document what is different and 
why in this javadoc.

##########
File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/values/package-info.java
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** Row support for AWS model classes. */
+@Experimental(Kind.SCHEMAS)
+package org.apache.beam.sdk.values;
+
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;

Review comment:
       Could we just put `AwsPojoRow` in the `aws2.schemas` package instead? 




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