Details
-
Bug
-
Status: Resolved
-
P3
-
Resolution: Fixed
-
2.0.0
Description
import com.google.protobuf.Timestamp; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.coders.CannotProvideCoderException; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsFactory; public class CoderTest { public static void main(String[] args) throws CannotProvideCoderException { PipelineOptions options = PipelineOptionsFactory.fromArgs(args).create(); Pipeline pipeline = Pipeline.create(options); Coder<Timestamp> coder = pipeline.getCoderRegistry().getCoder(Timestamp.class); // class org.apache.beam.sdk.coders.SerializableCoder System.out.println(coder.getClass()); } }
Right now we're sorting CoderProviderRegistrar}}s by canonical name but {{SerializableCoderProvider should be added last as a fallback if there're other {{CoderProvider}}s that support the same type.
Set<CoderProviderRegistrar> registrars = Sets.newTreeSet(ObjectsClassComparator.INSTANCE);
Attachments
Issue Links
- links to