aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/apache
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-09 18:56:40 +0100
committerGitHub <noreply@github.com>2024-01-09 18:56:40 +0100
commite95f266d2a3e48e62015220588a4fd73d5d5a5cb (patch)
treea8a784b6931fe52ad5f511cfef85af14e5f63991 /contrib/libs/apache
parent50a65e3b48a82d5b51f272664da389f2e0b0c99a (diff)
downloadydb-e95f266d2a3e48e62015220588a4fd73d5d5a5cb.tar.gz
Library import 6 (#888)
Diffstat (limited to 'contrib/libs/apache')
-rw-r--r--contrib/libs/apache/arrow/cpp/src/arrow/array/diff.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/contrib/libs/apache/arrow/cpp/src/arrow/array/diff.cc b/contrib/libs/apache/arrow/cpp/src/arrow/array/diff.cc
index a94ca178a4..6867423522 100644
--- a/contrib/libs/apache/arrow/cpp/src/arrow/array/diff.cc
+++ b/contrib/libs/apache/arrow/cpp/src/arrow/array/diff.cc
@@ -629,42 +629,44 @@ class MakeFormatterImpl {
auto fmt = fmt_str.c_str();
auto unit = checked_cast<const T&>(*array.type()).unit();
auto value = checked_cast<const NumericArray<T>&>(array).Value(index);
- using arrow_vendored::date::format;
+ // Using unqualified `format` directly would produce ambiguous
+ // lookup because of `std::format` (ARROW-15520).
+ namespace avd = arrow_vendored::date;
using std::chrono::nanoseconds;
using std::chrono::microseconds;
using std::chrono::milliseconds;
using std::chrono::seconds;
if (AddEpoch) {
- static arrow_vendored::date::sys_days epoch{arrow_vendored::date::jan / 1 / 1970};
+ static avd::sys_days epoch{avd::jan / 1 / 1970};
switch (unit) {
case TimeUnit::NANO:
- *os << format(fmt, static_cast<nanoseconds>(value) + epoch);
+ *os << avd::format(fmt, static_cast<nanoseconds>(value) + epoch);
break;
case TimeUnit::MICRO:
- *os << format(fmt, static_cast<microseconds>(value) + epoch);
+ *os << avd::format(fmt, static_cast<microseconds>(value) + epoch);
break;
case TimeUnit::MILLI:
- *os << format(fmt, static_cast<milliseconds>(value) + epoch);
+ *os << avd::format(fmt, static_cast<milliseconds>(value) + epoch);
break;
case TimeUnit::SECOND:
- *os << format(fmt, static_cast<seconds>(value) + epoch);
+ *os << avd::format(fmt, static_cast<seconds>(value) + epoch);
break;
}
return;
}
switch (unit) {
case TimeUnit::NANO:
- *os << format(fmt, static_cast<nanoseconds>(value));
+ *os << avd::format(fmt, static_cast<nanoseconds>(value));
break;
case TimeUnit::MICRO:
- *os << format(fmt, static_cast<microseconds>(value));
+ *os << avd::format(fmt, static_cast<microseconds>(value));
break;
case TimeUnit::MILLI:
- *os << format(fmt, static_cast<milliseconds>(value));
+ *os << avd::format(fmt, static_cast<milliseconds>(value));
break;
case TimeUnit::SECOND:
- *os << format(fmt, static_cast<seconds>(value));
+ *os << avd::format(fmt, static_cast<seconds>(value));
break;
}
};