You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2025/02/12 08:27:34 UTC

Re: [I] [DISCUSS] Exceptions vs status codes [iceberg-cpp]

pitrou commented on issue #14:
URL: https://github.com/apache/iceberg-cpp/issues/14#issuecomment-2652976790

   As a general data point for this discussion, I would mention the case of the Arrow C++ CSV parser. Arrow C++ uses a `Status` class (but `std::expected` would be similar) for error reporting. This implies that any potentially-failing function should return a `Status` (or, similarly, `Result<T>` or `std::expected<T, E>`).
   
   However, a CSV parser is a state machine that must withhold tens or hundreds of millions of transitions per second. It turns out that reporting a `Status` in such a critical path can reduce performance by 20-30%. The Arrow C++ CSV parser tries various tricks to avoid such reporting, which can have other consequences on security (see current discussion in https://github.com/apache/arrow/pull/45498).
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org