Coverage Report

Created: 2025-07-23 19:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/doris/be/src/util/jsonb_utils.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "jsonb_utils.h"
19
20
#include <cstdint>
21
22
#include "common/status.h"
23
#include "util/date_func.h"
24
#include "util/string_parser.hpp"
25
#include "vec/runtime/vdatetime_value.h"
26
27
namespace doris {
28
template <JsonbDecimalType T>
29
5
void JsonbToJson::decimal_to_json(const T& value, const uint32_t precision, const uint32_t scale) {
30
5
    auto value_str = value.to_string(precision, scale);
31
5
    os_.write(value_str.data(), value_str.size());
32
5
}
_ZN5doris11JsonbToJson15decimal_to_jsonITk16JsonbDecimalTypeNS_10vectorized7DecimalIiEEEEvRKT_jj
Line
Count
Source
29
1
void JsonbToJson::decimal_to_json(const T& value, const uint32_t precision, const uint32_t scale) {
30
1
    auto value_str = value.to_string(precision, scale);
31
1
    os_.write(value_str.data(), value_str.size());
32
1
}
_ZN5doris11JsonbToJson15decimal_to_jsonITk16JsonbDecimalTypeNS_10vectorized7DecimalIlEEEEvRKT_jj
Line
Count
Source
29
1
void JsonbToJson::decimal_to_json(const T& value, const uint32_t precision, const uint32_t scale) {
30
1
    auto value_str = value.to_string(precision, scale);
31
1
    os_.write(value_str.data(), value_str.size());
32
1
}
_ZN5doris11JsonbToJson15decimal_to_jsonITk16JsonbDecimalTypeNS_10vectorized12Decimal128V3EEEvRKT_jj
Line
Count
Source
29
2
void JsonbToJson::decimal_to_json(const T& value, const uint32_t precision, const uint32_t scale) {
30
2
    auto value_str = value.to_string(precision, scale);
31
2
    os_.write(value_str.data(), value_str.size());
32
2
}
_ZN5doris11JsonbToJson15decimal_to_jsonITk16JsonbDecimalTypeNS_10vectorized7DecimalIN4wide7integerILm256EiEEEEEEvRKT_jj
Line
Count
Source
29
1
void JsonbToJson::decimal_to_json(const T& value, const uint32_t precision, const uint32_t scale) {
30
1
    auto value_str = value.to_string(precision, scale);
31
1
    os_.write(value_str.data(), value_str.size());
32
1
}
33
34
template void JsonbToJson::decimal_to_json<vectorized::Decimal32>(
35
        const vectorized::Decimal32& value, const uint32_t precision, const uint32_t scale);
36
template void JsonbToJson::decimal_to_json<vectorized::Decimal64>(
37
        const vectorized::Decimal64& value, const uint32_t precision, const uint32_t scale);
38
template void JsonbToJson::decimal_to_json<vectorized::Decimal128V3>(
39
        const vectorized::Decimal128V3& value, const uint32_t precision, const uint32_t scale);
40
template void JsonbToJson::decimal_to_json<vectorized::Decimal256>(
41
        const vectorized::Decimal256& value, const uint32_t precision, const uint32_t scale);
42
} // namespace doris