acrites commented on code in PR #37631:
URL: https://github.com/apache/beam/pull/37631#discussion_r2830722408


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java:
##########
@@ -1372,7 +1372,7 @@ public DataflowPipelineJob run(Pipeline pipeline) {
       replaceV1Transforms(pipeline);
     }
     // Capture the SdkComponents for look up during step translations
-    SdkComponents dataflowV1Components = SdkComponents.create();
+    SdkComponents dataflowV1Components = SdkComponents.create(options);

Review Comment:
   Done.



##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/CoderTranslators.java:
##########
@@ -177,6 +194,97 @@ public RowCoder fromComponents(
     };
   }
 
+  static <T> CoderTranslator<SchemaCoder<T>> schema() {
+    return new CoderTranslator<SchemaCoder<T>>() {
+      private static final String TO_ROW_FUNCTION_URN = 
"beam:torowfn:javasdk:v1";
+      private static final String FROM_ROW_FUNCTION_URN = 
"beam:fromrowfn:javasdk:v1";
+      private static final String TYPE_DESCRIPTOR_URN = 
"beam:typedescriptor:javasdk:v1";
+
+      @Override
+      public ImmutableList<? extends Coder<?>> getComponents(SchemaCoder<T> 
from) {
+        return ImmutableList.of();
+      }
+
+      @Override
+      public String getUrn(SchemaCoder<T> from, TranslationContext context) {
+        if (context instanceof TranslationContextWithOptions) {

Review Comment:
   Great idea!



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