paleolimbot commented on code in PR #4645:
URL: https://github.com/apache/arrow-adbc/pull/4645#discussion_r3720717968
##########
c/driver/framework/base_driver.h:
##########
@@ -169,11 +169,19 @@ class Option {
return std::visit(
[&](auto&& value) -> AdbcStatusCode {
using T = std::decay_t<decltype(value)>;
- if constexpr (std::is_same_v<T, std::string>) {
- size_t value_size_with_terminator = value.size() + 1;
+ if constexpr (std::is_same_v<T, std::string> || std::is_same_v<T,
int64_t>) {
+ std::string formatted;
+ std::string_view string_value;
+ if constexpr (std::is_same_v<T, std::string>) {
+ string_value = value;
+ } else {
+ formatted = std::to_string(value);
+ string_value = formatted;
Review Comment:
It's a tiny bit of a pain, but you could guard the double translation in a
define for older gcc/clang since most of the time `to_string()` is fine.
--
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]