RamakrishnaChilaka commented on PR #21177:
URL: https://github.com/apache/datafusion/pull/21177#issuecomment-4140302437

   > Thanks for this fix!
   > 
   > This fix is fine, although I find the overall code structure here pretty 
fragile. At present, we will lose `sort_information` and `show_sizes` in this 
scenario (not sure offhand if that is problematic today), and we could 
potentially lose more metadata in the future.
   
   Thank you for the review @neilconway!
   
   I've updated the approach to clone self and only mutate the 
projection-related fields, so all metadata (fetch, sort_information, 
show_sizes, and any future fields) is preserved automatically. Sort information 
is re-projected via project_orderings() to remap column indices to the new 
schema (the old code was dropping it entirely via try_new()). This should make 
it future-proof against new fields being added to MemorySourceConfig. Please 
let me know your thoughts on this approach.


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