MCPcopy Create free account
hub / github.com/apache/arrow / CheckTimezones

Function CheckTimezones

cpp/src/arrow/compute/kernels/scalar_temporal_binary.cc:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66using WeekState = OptionsWrapper<WeekOptions>;
67
68Status CheckTimezones(const ExecSpan& batch) {
69 const auto& timezone = GetInputTimezone(*batch[0].type());
70 for (int i = 1; i < batch.num_values(); i++) {
71 const auto& other_timezone = GetInputTimezone(*batch[i].type());
72 if (other_timezone != timezone) {
73 return Status::TypeError("Got differing time zone '", other_timezone,
74 "' for argument ", i + 1, "; expected '", timezone, "'");
75 }
76 }
77 return Status::OK();
78}
79
80template <template <typename...> class Op, typename Duration, typename InType,
81 typename OutType>

Callers 1

ExecWithOptionsMethod · 0.85

Calls 4

TypeErrorFunction · 0.50
OKFunction · 0.50
typeMethod · 0.45
num_valuesMethod · 0.45

Tested by

no test coverage detected