Coverage Report

Created: 2026-07-13 18:19

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/format/hive_text_util.h
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
#pragma once
19
20
#include <cstddef>
21
22
namespace doris {
23
24
inline bool is_hive_text_separator_escaped(const char* data, size_t separator_pos,
25
7.61M
                                           char escape_char) {
26
7.61M
    size_t escape_count = 0;
27
7.61M
    while (separator_pos > escape_count && data[separator_pos - escape_count - 1] == escape_char) {
28
62
        ++escape_count;
29
62
    }
30
7.61M
    return escape_count % 2 == 1;
31
7.61M
}
32
33
} // namespace doris