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


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/ModelCoderRegistrar.java:
##########
@@ -136,4 +137,23 @@ public Map<Class<? extends Coder>, String> getCoderURNs() {
   public Map<Class<? extends Coder>, CoderTranslator<? extends Coder>> 
getCoderTranslators() {
     return BEAM_MODEL_CODERS;
   }
+
+  @Override
+  public boolean isKnownCoder(Coder<?> coder, PipelineOptions options) {
+    if (coder.getClass() == SchemaCoder.class
+        && !ExperimentalOptions.hasExperiment(options, 
"use_known_schema_coder")) {

Review Comment:
   I've found that if I add Schemas to the list of coders to be ignored 
[here](https://github.com/apache/beam/blob/94510075efe1ea52c9f2a3dcc42ab8fc0a54b9e2/sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py#L391)
 it causes the previously failing post-commit 
(beam_PostCommit_Java_ValidatesRunner_ULR) to pass. This makes it so that 
Python treats the new schema urn as unknown and just passes it along as bytes.
   
   With that change, should I go back to the previous implementation where we 
use the new schema coder type unless specifying compatibility 2.76 or earlier? 
i.e. start using this new coder type with 2.77 and later.



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