pixelherodev commented on PR #559:
URL: https://github.com/apache/arrow-go/pull/559#issuecomment-3484079864

   > Do we have a sense of how hard it would be to keep these patches 
maintained?
   
   Can't say for sure, given that I don't know what upstream looks like, but 
FWIW: I developed the patches on internal/flatbuf first, not knowing it was 
generated code, and then it took me all of... ten minutes? to figure out how to 
patch the Go code generator, and that's without having touched C++ in ~5 years.
   
   So, I'd guess "not very hard." Especially since the logic of the patch is 
quite straightforwards:
   
   - Inline the flatbuffer Table. This means altering the `_tab 
flatbuffer.Table` line, which is constant, to just drop the _tab.
       - Find all references to _tab and replace them with direct references. 
Was able to just s/_tab\.//g and it worked right away.
   - Find the function that generates a pointer return and takes a pointer in 
to use as storage, rewrite the return signature from *T to `(T, bool)`, drop 
the logic that checks the passed in pointer and allocates, and just return the 
structure on success.


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

Reply via email to