lidavidm commented on code in PR #2081: URL: https://github.com/apache/arrow-adbc/pull/2081#discussion_r1722572611
########## c/driver/framework/status.h: ########## @@ -20,13 +20,17 @@ #include <cassert> #include <cstring> #include <memory> +#include <sstream> #include <string> #include <utility> #include <variant> #include <vector> -#include <arrow-adbc/adbc.h> +#if defined(ADBC_FRAMEWORK_USE_FMT) Review Comment: Are we going to keep this around forever? Or port everything away? ########## c/driver/framework/base_driver.cc: ########## @@ -66,7 +66,24 @@ Result<std::string_view> Option::AsString() const { if constexpr (std::is_same_v<T, std::string>) { return value; } - return status::InvalidArgument("Invalid string value {}", *this); + return status::InvalidArgument("Invalid string value {}", this->Format()); + }, + value_); +} + +std::string Option::Format() const { + return std::visit( + [&](auto&& value) { + using T = std::decay_t<decltype(value)>; + if constexpr (std::is_same_v<T, adbc::driver::Option::Unset>) { + return std::string("(NULL)"); Review Comment: nit: is the explicit string necessary? (You could declare the lambda to return string, and/or use string_literals?) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org