You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/16 00:55:00 UTC

[GitHub] [beam] laraschmidt commented on a change in pull request #16249: [BEAM-13467] Properly handle null argument types for logical types.

laraschmidt commented on a change in pull request #16249:
URL: https://github.com/apache/beam/pull/16249#discussion_r770147100



##########
File path: sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/SchemaTranslationTest.java
##########
@@ -315,4 +316,36 @@ public void typeInfoNotSet() {
       assertThat(exception.getCause().getMessage(), containsString("TYPEINFO_NOT_SET"));
     }
   }
+
+  /** A simple logical type that has no argument. */
+  public static class NullArgumentLogicalType implements Schema.LogicalType<String, String> {
+    public static final String IDENTIFIER = "beam:logical_type:null_argument:v1";
+
+    public NullArgumentLogicalType() {}
+
+    @Override
+    public String toBaseType(String input) {
+      return input;
+    }
+
+    @Override
+    public String toInputType(String base) {
+      return base;
+    }
+
+    @Override
+    public String getIdentifier() {
+      return IDENTIFIER;
+    }
+
+    @Override
+    public Schema.FieldType getArgumentType() {

Review comment:
       done.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org