rdblue commented on pull request #1920:
URL: https://github.com/apache/iceberg/pull/1920#issuecomment-744790207


   This looks good to me. One last thing to consider is whether we should do 
this in Hive or whether we should do this through serialization. If we do it in 
Hive, then we have code that touches `BaseTable` and does substitution. That's 
okay, but not great.
   
   Another way to do this is to make `BaseTable` implement `Serializable` and 
`writeReplace`, then implement `Serializable` in `StaticTable`.
   
   ```java
     Object writeReplace() throws ObjectStreamException {
       return new StaticTable(ops.current().metadataFileLocation(), ops.io());
     }
   ```
   
   Then a table would automatically become a `StaticTable` when serialized. 
That's convenient and doesn't expose any internals.
   
   FYI @aokolnychyi and @RussellSpitzer.


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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to