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

Function GetDecimalValuesAndScales

cpp/src/arrow/util/decimal_benchmark.cc:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45static std::vector<DecimalValueAndScale> GetDecimalValuesAndScales() {
46 const std::vector<std::string>& value_strs = GetValuesAsString();
47 std::vector<DecimalValueAndScale> result(value_strs.size());
48 for (size_t i = 0; i < value_strs.size(); ++i) {
49 int32_t precision;
50 ARROW_CHECK_OK(Decimal128::FromString(value_strs[i], &result[i].decimal,
51 &result[i].scale, &precision));
52 }
53 return result;
54}
55
56static void FromString(benchmark::State& state) { // NOLINT non-const reference
57 const std::vector<std::string>& values = GetValuesAsString();

Callers 1

ToStringFunction · 0.85

Calls 2

FromStringFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected