You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "simonykq (via GitHub)" <gi...@apache.org> on 2024/11/01 13:42:16 UTC

Re: [I] Serialization of the org.apache.iceberg.io.WriteResult class. [iceberg]

simonykq commented on issue #10710:
URL: https://github.com/apache/iceberg/issues/10710#issuecomment-2451893935

   @pvary 
   
   Thanks for the info. Very informative.
   
   I am more of less thinking of letting flink runtime treat it as a Pojo types using `PojoTypeInfo`. Something like this:
   
   @TypeInfo(WriteResult.WriteResultTypeInfoFactory.class)
   ```
   public class WriteResult {
   
     private DataFile[] dataFiles;
     private DeleteFile[] deleteFiles;
     private CharSequence[] referencedDataFiles;
   
       public static class WriteResultTypeInfoFactory extends TypeInfoFactory<WriteResult> {
           @Override
           public TypeInformation<WriteResult> createTypeInfo(Type t,
                   Map<String, TypeInformation<?>> genericParameters) {
               return Types.POJO(WriteResult.class, Map.of(
                       "dataFiles", Types.OBJECT_ARRAY(TypeInformation.of(BaseFile.class)),
                       "deleteFiles", Types.OBJECT_ARRAY(TypeInformation.of(BaseFile.class)),
                       "referencedDataFiles", Types.OBJECT_ARRAY(Types.STRING)));
           }
       }
   
   }
   ```
   
   And then maybe doing something similiar for `BaseFile.class`. Is that feasible?


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org