You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/27 22:49:09 UTC

[GitHub] [hudi] jinyius commented on a diff in pull request #6761: [HUDI-4904] Add support for unraveling proto schemas in ProtoClassBasedSchemaProvider

jinyius commented on code in PR #6761:
URL: https://github.com/apache/hudi/pull/6761#discussion_r981404962


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/ProtoConversionUtil.java:
##########
@@ -80,17 +83,19 @@ public static GenericRecord convertToAvro(Schema schema, Message message) {
    * 2. Convert directly from a protobuf {@link Message} to a {@link GenericRecord} while properly handling enums and wrapped primitives mentioned above.
    */
   private static class AvroSupport {
+    private static final Schema STRING_SCHEMA = Schema.create(Schema.Type.STRING);
+    private static final Schema NULL_SCHEMA = Schema.create(Schema.Type.NULL);
+    private static final String OVERFLOW_DESCRIPTOR_FIELD_NAME = "descriptor_full_name";
+    private static final String OVERFLOW_BYTES_FIELD_NAME = "proto_bytes";
+    private static final Schema RECURSION_OVERFLOW_SCHEMA = Schema.createRecord("recursion_overflow", null, "org.apache.hudi.proto", false,

Review Comment:
   why rename the field?



##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/helpers/TestProtoConversionUtil.java:
##########
@@ -18,7 +18,10 @@
 
 package org.apache.hudi.utilities.sources.helpers;
 
+import org.apache.hudi.common.util.collection.Pair;
+import org.apache.hudi.utilities.test.proto.Child;
 import org.apache.hudi.utilities.test.proto.Nested;
+import org.apache.hudi.utilities.test.proto.Parent;

Review Comment:
   did you want to try using google's struct proto as a test case?



-- 
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: commits-unsubscribe@hudi.apache.org

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