AliRana30 commented on PR #49086:
URL: https://github.com/apache/arrow/pull/49086#issuecomment-3835416952

   You're absolutely right @kou - changing Table::Make() to return 
Result<std::shared_ptr<Table>> is a backward-incompatible API change that 
affects all language bindings.
   
   I see two options:
   
   1.Keep the existing API: Maintain std::shared_ptr<Table> Table::Make(...) 
but replace the internal DCHECK with runtime validation that returns nullptr on 
invalid input (with appropriate logging).
   2.Add a new method: Introduce Result<std::shared_ptr<Table>> 
Table::MakeSafe(...) for the new error-handling approach, while keeping the 
existing Make() for backward compatibility.
   
   Which approach would you prefer? I'll also update the implementation to use 
ARROW_ASSIGN_OR_RAISE as suggested.
   
   Regarding the original issue (null pointer dereference), I can address it 
with explicit null checks and appropriate error handling without changing the 
public API signature


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