stevenschlansker opened a new pull request, #2243:
URL: https://github.com/apache/fury/pull/2243

   ## What does this PR do?
   
   Extend Java Row Format to allow registering custom datatypes (e.g. UUID as 
Int128) and collection factories (e.g. `SortedSet<UUID>` as `new 
TreeSet<UUID>(customComparator)` )
   Additionally supports arrays of custom types e.g. `UUID[]`
   
   Since the type inference is in `fury-core` but I wanted to keep new features 
scoped to `fury-format`, I had to add a small plugin interface to core so that 
format can add types dynamically without affecting existing core behavior.
   
   ## Related issues
   
   https://github.com/apache/fury/issues/2208
   
   ## Does this PR introduce any user-facing change?
   
   - [x] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   The `Encoders` class has new `registerCustomCodec` and 
`registerCustomCollectionFactory` methods.
   All custom types are written with the existing protocol as embedded memory 
buffers just like any other field, but with a custom byte representation, so 
there should be no wire compatibility concerns.
   
   ## Benchmark
   
   There should be no change to performance in existing use cases. The code is 
carefully written to have no runtime impact if not used. Custom types are 
invoked via static methods or instance method on static final fields, which 
should be easily inlined by jit for minimum overhead.
   
   Here is example generated code to help show this:
   https://gist.github.com/stevenschlansker/ed7dae863e78d3c87e30bdea39fa8dea
   


-- 
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: [email protected]

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