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/02/02 20:21:04 UTC

[GitHub] [hudi] alexeykudinkin commented on pull request #4716: [HUDI-3322][HUDI-3343] Fixing Metadata Table Records Duplication Issues

alexeykudinkin commented on pull request #4716:
URL: https://github.com/apache/hudi/pull/4716#issuecomment-1028323837


   @nsivabalan here's the test:
   ```
     @Test
     void testAvroBWC() throws IOException {
       Writer w = new Writer("foo", 0xDEAD);
       byte[] buf = HoodieAvroUtils.avroToBytes(w);
       GenericRecord r = HoodieAvroUtils.bytesToAvro(buf, Writer.SCHEMA$, Reader.SCHEMA$);
       assertEquals(w.getKey(), r.get("key"));
     }
   ```
   
   For the following schema:
   ```
   {
     "namespace": "org.apache.hudi.avro.model",
     "type": "record",
     "name": "TestAvroRecord",
     "fields": [
       {
         "name": "writer",
         "type": ["null", {
           "type": "record",
           "name": "Writer",
           "fields": [
             {
               "name": "key",
               "type": ["null", "string"]
             },
             {
               "name": "value",
               "type": ["null", "int"]
             }
           ]
         }]
       },
       {
         "name": "reader",
         "type": ["null",     {
           "name": "Reader",
           "type": "record",
           "fields": [
             {
               "name": "key",
               "type": ["null", "string"]
             }
           ]
         }]
       }
     ]
   }
   ```
   
   Working as expected


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