/Users/deen/code/yugabyte-db/src/yb/common/ql_protocol_util.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) YugaByte, Inc. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
4 | | // in compliance with the License. You may obtain a copy of the License at |
5 | | // |
6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
7 | | // |
8 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
9 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
10 | | // or implied. See the License for the specific language governing permissions and limitations |
11 | | // under the License. |
12 | | // |
13 | | |
14 | | #ifndef YB_COMMON_QL_PROTOCOL_UTIL_H |
15 | | #define YB_COMMON_QL_PROTOCOL_UTIL_H |
16 | | |
17 | | #include <boost/preprocessor/cat.hpp> |
18 | | #include <boost/preprocessor/seq/for_each.hpp> |
19 | | |
20 | | #include "yb/common/common_fwd.h" |
21 | | #include "yb/common/common_types.pb.h" |
22 | | #include "yb/common/ql_protocol.pb.h" |
23 | | #include "yb/common/value.pb.h" |
24 | | |
25 | | #include "yb/util/status.h" |
26 | | #include "yb/util/status_format.h" |
27 | | #include "yb/util/yb_partition.h" |
28 | | |
29 | | namespace yb { |
30 | | |
31 | | class QLRowBlock; |
32 | | class Schema; |
33 | | |
34 | | #define QL_PROTOCOL_TYPES \ |
35 | | ((Int8, int8, int8_t)) \ |
36 | | ((Int16, int16, int16_t)) \ |
37 | | ((Int32, int32, int32_t)) \ |
38 | | ((Int64, int64, int64_t)) \ |
39 | | ((String, string, const std::string&)) \ |
40 | | ((Binary, binary, const std::string&)) \ |
41 | | ((Bool, bool, bool)) \ |
42 | | ((Float, float, float)) \ |
43 | | ((Double, double, double)) \ |
44 | | ((Jsonb, jsonb, const std::string&)) \ |
45 | | ((Timestamp, timestamp, int64_t)) \ |
46 | | |
47 | 8.41M | #define PP_CAT3(a, b, c) BOOST_PP_CAT(a, BOOST_PP_CAT(b, c)) |
48 | | |
49 | | #define QL_PROTOCOL_TYPE_DECLARATIONS_IMPL(name, lname, type) \ |
50 | | void PP_CAT3(QLAdd, name, ColumnValue)( \ |
51 | | QLWriteRequestPB* req, int column_id, type value); \ |
52 | | \ |
53 | | void PP_CAT3(QLSet, name, Expression)(QLExpressionPB *expr, type value); \ |
54 | | \ |
55 | | template <class RequestPB> \ |
56 | 2.22M | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ |
57 | 2.22M | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ |
58 | 2.22M | } \ void yb::QLAddInt32HashValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, int) Line | Count | Source | 56 | 1.77M | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 1.77M | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 1.77M | } \ |
void yb::QLAddStringHashValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Line | Count | Source | 56 | 76.5k | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 76.5k | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 76.5k | } \ |
void yb::QLAddInt32HashValue<yb::QLReadRequestPB>(yb::QLReadRequestPB*, int) Line | Count | Source | 56 | 67 | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 67 | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 67 | } \ |
void yb::QLAddStringHashValue<yb::QLReadRequestPB>(yb::QLReadRequestPB*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Line | Count | Source | 56 | 615 | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 615 | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 615 | } \ |
void yb::QLAddInt8HashValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, signed char) Line | Count | Source | 56 | 135k | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 135k | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 135k | } \ |
void yb::QLAddInt16HashValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, short) Line | Count | Source | 56 | 71.3k | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 71.3k | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 71.3k | } \ |
void yb::QLAddInt64HashValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, long long) Line | Count | Source | 56 | 171k | void PP_CAT3(QLAdd, name, HashValue)(RequestPB* req, type value) { \ | 57 | 171k | PP_CAT3(QLSet, name, Expression)(req->add_hashed_column_values(), value); \ | 58 | 171k | } \ |
|
59 | | template <class RequestPB> \ |
60 | 5.21k | void PP_CAT3(QLAdd, name, RangeValue)(RequestPB* req, type value) { \ |
61 | 5.21k | PP_CAT3(QLSet, name, Expression)(req->add_range_column_values(), value); \ |
62 | 5.21k | } \ void yb::QLAddStringRangeValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Line | Count | Source | 60 | 5.21k | void PP_CAT3(QLAdd, name, RangeValue)(RequestPB* req, type value) { \ | 61 | 5.21k | PP_CAT3(QLSet, name, Expression)(req->add_range_column_values(), value); \ | 62 | 5.21k | } \ |
Unexecuted instantiation: void yb::QLAddTimestampRangeValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, long long) Unexecuted instantiation: void yb::QLAddInt32RangeValue<yb::QLWriteRequestPB>(yb::QLWriteRequestPB*, int) |
63 | | void PP_CAT3(QLSet, name, Condition)( \ |
64 | | QLConditionPB* condition, int column_id, QLOperator op, type value); \ |
65 | | \ |
66 | | void PP_CAT3(QLAdd, name, Condition)( \ |
67 | | QLConditionPB* condition, int column_id, QLOperator op, type value); \ |
68 | | |
69 | | #define QL_PROTOCOL_TYPE_DECLARATIONS(i, data, entry) QL_PROTOCOL_TYPE_DECLARATIONS_IMPL entry |
70 | | |
71 | | BOOST_PP_SEQ_FOR_EACH(QL_PROTOCOL_TYPE_DECLARATIONS, ~, QL_PROTOCOL_TYPES); |
72 | | |
73 | | void QLAddNullColumnValue(QLWriteRequestPB* req, int column_id); |
74 | | |
75 | | template <class RequestPB> |
76 | 120k | void QLSetHashCode(RequestPB* req) { |
77 | 120k | std::string tmp; |
78 | 320k | for (const auto& column : req->hashed_column_values()) { |
79 | 320k | AppendToKey(column.value(), &tmp); |
80 | 320k | } |
81 | 120k | req->set_hash_code(YBPartition::HashColumnCompoundValue(tmp)); |
82 | 120k | } |
83 | | |
84 | | QLValuePB* QLPrepareColumn(QLWriteRequestPB* req, int column_id); |
85 | | QLValuePB* QLPrepareCondition(QLConditionPB* condition, int column_id, QLOperator op); |
86 | | |
87 | | void QLAddColumns(const Schema& schema, const std::vector<ColumnId>& columns, |
88 | | QLReadRequestPB* req); |
89 | | |
90 | | std::unique_ptr<QLRowBlock> CreateRowBlock(QLClient client, const Schema& schema, Slice data); |
91 | | |
92 | | // Does this write request require reading existing data for evaluating expressions before writing? |
93 | | bool RequireReadForExpressions(const QLWriteRequestPB& request); |
94 | | |
95 | | // Does this write request require reading existing data in general before writing? |
96 | | bool RequireRead(const QLWriteRequestPB& request, const Schema& schema); |
97 | | |
98 | | // Does this write request perform a range operation (e.g. range delete)? |
99 | | bool IsRangeOperation(const QLWriteRequestPB& request, const Schema& schema); |
100 | | |
101 | | #define RETURN_NOT_ENOUGH(data, sz) \ |
102 | 141M | do { \ |
103 | 141M | if (data->size() < (sz)) { \ |
104 | 0 | return STATUS(NetworkError, "Truncated CQL message"); \ |
105 | 0 | } \ |
106 | 141M | } while (0) |
107 | | |
108 | | // Decode a CQL number (8, 16, 32 and 64-bit integer). <num_type> is the parsed integer type. |
109 | | // <converter> converts the number from network byte-order to machine order and <data_type> |
110 | | // is the coverter's return type. The converter's return type <data_type> is unsigned while |
111 | | // <num_type> may be signed or unsigned. |
112 | | template<typename num_type, typename data_type> |
113 | | static inline CHECKED_STATUS CQLDecodeNum( |
114 | 102M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { |
115 | | |
116 | 102M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); |
117 | 102M | if (len != sizeof(num_type)) { |
118 | 8 | return STATUS_SUBSTITUTE(NetworkError, |
119 | 8 | "unexpected number byte length: expected $0, provided $1", |
120 | 8 | static_cast<int64_t>(sizeof(num_type)), len); |
121 | 8 | } |
122 | | |
123 | 102M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); |
124 | 102M | *val = static_cast<num_type>((*converter)(data->data())); |
125 | 102M | data->remove_prefix(sizeof(num_type)); |
126 | 102M | return Status::OK(); |
127 | 102M | } cql_message.cc:yb::Status yb::CQLDecodeNum<unsigned char, unsigned char>(unsigned long, unsigned char (*)(void const*), yb::Slice*, unsigned char*) Line | Count | Source | 114 | 9.28M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 9.28M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 9.28M | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 9.28M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 9.28M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 9.28M | data->remove_prefix(sizeof(num_type)); | 126 | 9.28M | return Status::OK(); | 127 | 9.28M | } |
cql_message.cc:yb::Status yb::CQLDecodeNum<unsigned short, unsigned short>(unsigned long, unsigned short (*)(void const*), yb::Slice*, unsigned short*) Line | Count | Source | 114 | 18.2M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 18.2M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 18.2M | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 18.2M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 18.2M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 18.2M | data->remove_prefix(sizeof(num_type)); | 126 | 18.2M | return Status::OK(); | 127 | 18.2M | } |
cql_message.cc:yb::Status yb::CQLDecodeNum<int, unsigned int>(unsigned long, unsigned int (*)(void const*), yb::Slice*, int*) Line | Count | Source | 114 | 21.8M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 21.8M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 21.8M | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 21.8M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 21.8M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 21.8M | data->remove_prefix(sizeof(num_type)); | 126 | 21.8M | return Status::OK(); | 127 | 21.8M | } |
cql_message.cc:yb::Status yb::CQLDecodeNum<long long, unsigned long long>(unsigned long, unsigned long long (*)(void const*), yb::Slice*, long long*) Line | Count | Source | 114 | 8.79M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 8.79M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 8.79M | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 8.79M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 8.79M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 8.79M | data->remove_prefix(sizeof(num_type)); | 126 | 8.79M | return Status::OK(); | 127 | 8.79M | } |
cql_message.cc:yb::Status yb::CQLDecodeNum<yb::ql::CQLMessage::Consistency, unsigned short>(unsigned long, unsigned short (*)(void const*), yb::Slice*, yb::ql::CQLMessage::Consistency*) Line | Count | Source | 114 | 8.91M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 8.91M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 8.91M | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 8.91M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 8.91M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 8.91M | data->remove_prefix(sizeof(num_type)); | 126 | 8.91M | return Status::OK(); | 127 | 8.91M | } |
ql_rowblock.cc:yb::Status yb::CQLDecodeNum<int, unsigned int>(unsigned long, unsigned int (*)(void const*), yb::Slice*, int*) Line | Count | Source | 114 | 186k | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 186k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 186k | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 186k | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 186k | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 186k | data->remove_prefix(sizeof(num_type)); | 126 | 186k | return Status::OK(); | 127 | 186k | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<int, unsigned int>(unsigned long, unsigned int (*)(void const*), yb::Slice*, int*) Line | Count | Source | 114 | 32.8M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 32.8M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 32.8M | if (len != sizeof(num_type)) { | 118 | 1 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 1 | "unexpected number byte length: expected $0, provided $1", | 120 | 1 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 1 | } | 122 | | | 123 | 32.8M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 32.8M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 32.8M | data->remove_prefix(sizeof(num_type)); | 126 | 32.8M | return Status::OK(); | 127 | 32.8M | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<signed char, unsigned char>(unsigned long, unsigned char (*)(void const*), yb::Slice*, signed char*) Line | Count | Source | 114 | 40.5k | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 40.5k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 40.5k | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 40.5k | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 40.5k | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 40.5k | data->remove_prefix(sizeof(num_type)); | 126 | 40.5k | return Status::OK(); | 127 | 40.5k | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<short, unsigned short>(unsigned long, unsigned short (*)(void const*), yb::Slice*, short*) Line | Count | Source | 114 | 21.3k | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 21.3k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 21.3k | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 21.3k | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 21.3k | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 21.3k | data->remove_prefix(sizeof(num_type)); | 126 | 21.3k | return Status::OK(); | 127 | 21.3k | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<unsigned long long, unsigned long long>(unsigned long, unsigned long long (*)(void const*), yb::Slice*, unsigned long long*) Line | Count | Source | 114 | 119 | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 119 | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 119 | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 119 | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 119 | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 119 | data->remove_prefix(sizeof(num_type)); | 126 | 119 | return Status::OK(); | 127 | 119 | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<unsigned char, unsigned char>(unsigned long, unsigned char (*)(void const*), yb::Slice*, unsigned char*) Line | Count | Source | 114 | 115k | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 115k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 115k | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 115k | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 115k | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 115k | data->remove_prefix(sizeof(num_type)); | 126 | 115k | return Status::OK(); | 127 | 115k | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<long long, unsigned long long>(unsigned long, unsigned long long (*)(void const*), yb::Slice*, long long*) Line | Count | Source | 114 | 1.94M | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 1.94M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 1.94M | if (len != sizeof(num_type)) { | 118 | 7 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 7 | "unexpected number byte length: expected $0, provided $1", | 120 | 7 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 7 | } | 122 | | | 123 | 1.94M | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 1.94M | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 1.94M | data->remove_prefix(sizeof(num_type)); | 126 | 1.94M | return Status::OK(); | 127 | 1.94M | } |
ql_value.cc:yb::Status yb::CQLDecodeNum<unsigned int, unsigned int>(unsigned long, unsigned int (*)(void const*), yb::Slice*, unsigned int*) Line | Count | Source | 114 | 465 | const size_t len, data_type (*converter)(const void*), Slice* data, num_type* val) { | 115 | | | 116 | 465 | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 117 | 465 | if (len != sizeof(num_type)) { | 118 | 0 | return STATUS_SUBSTITUTE(NetworkError, | 119 | 0 | "unexpected number byte length: expected $0, provided $1", | 120 | 0 | static_cast<int64_t>(sizeof(num_type)), len); | 121 | 0 | } | 122 | | | 123 | 465 | RETURN_NOT_ENOUGH(data, sizeof(num_type)); | 124 | 465 | *val = static_cast<num_type>((*converter)(data->data())); | 125 | 465 | data->remove_prefix(sizeof(num_type)); | 126 | 465 | return Status::OK(); | 127 | 465 | } |
|
128 | | |
129 | | // Decode a CQL floating point number (float or double). <float_type> is the parsed floating point |
130 | | // type. <converter> converts the number from network byte-order to machine order and <data_type> |
131 | | // is the coverter's return type. The converter's return type <data_type> is an integer type. |
132 | | template<typename float_type, typename data_type> |
133 | | static inline CHECKED_STATUS CQLDecodeFloat( |
134 | 209 | const size_t len, data_type (*converter)(const void*), Slice* data, float_type* val) { |
135 | | // Make sure float and double are exactly sizeof uint32_t and uint64_t. |
136 | 209 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); |
137 | 209 | data_type bval = 0; |
138 | 209 | RETURN_NOT_OK(CQLDecodeNum(len, converter, data, &bval)); |
139 | 209 | *val = *reinterpret_cast<float_type*>(&bval); |
140 | 209 | return Status::OK(); |
141 | 209 | } ql_value.cc:yb::Status yb::CQLDecodeFloat<float, unsigned int>(unsigned long, unsigned int (*)(void const*), yb::Slice*, float*) Line | Count | Source | 134 | 90 | const size_t len, data_type (*converter)(const void*), Slice* data, float_type* val) { | 135 | | // Make sure float and double are exactly sizeof uint32_t and uint64_t. | 136 | 90 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); | 137 | 90 | data_type bval = 0; | 138 | 90 | RETURN_NOT_OK(CQLDecodeNum(len, converter, data, &bval)); | 139 | 90 | *val = *reinterpret_cast<float_type*>(&bval); | 140 | 90 | return Status::OK(); | 141 | 90 | } |
ql_value.cc:yb::Status yb::CQLDecodeFloat<double, unsigned long long>(unsigned long, unsigned long long (*)(void const*), yb::Slice*, double*) Line | Count | Source | 134 | 119 | const size_t len, data_type (*converter)(const void*), Slice* data, float_type* val) { | 135 | | // Make sure float and double are exactly sizeof uint32_t and uint64_t. | 136 | 119 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); | 137 | 119 | data_type bval = 0; | 138 | 119 | RETURN_NOT_OK(CQLDecodeNum(len, converter, data, &bval)); | 139 | 119 | *val = *reinterpret_cast<float_type*>(&bval); | 140 | 119 | return Status::OK(); | 141 | 119 | } |
|
142 | | |
143 | 31.7M | static inline CHECKED_STATUS CQLDecodeBytes(size_t len, Slice* data, std::string* val) { |
144 | 31.7M | RETURN_NOT_ENOUGH(data, len); |
145 | 31.7M | val->assign(data->cdata(), len); |
146 | 31.7M | data->remove_prefix(len); |
147 | 31.7M | return Status::OK(); |
148 | 31.7M | } Unexecuted instantiation: tablet_server_main.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: insert-generated-rows.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_test_base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: metrics_snapshotter.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql-test-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: audit_logger.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: eval_aggr.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: executor.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: client-test-util.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: sys_catalog_writer.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: catalog_manager_ent.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: table_handle.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql-dml-test-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: txn-test-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: snapshot_test_util.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: admin-test-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cluster_verifier.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: load_generator.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: redis_table_test_base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: test_workload.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ts_itest-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: yb_table_test_base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) cql_message.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Line | Count | Source | 143 | 9.35M | static inline CHECKED_STATUS CQLDecodeBytes(size_t len, Slice* data, std::string* val) { | 144 | 9.35M | RETURN_NOT_ENOUGH(data, len); | 145 | 9.35M | val->assign(data->cdata(), len); | 146 | 9.35M | data->remove_prefix(len); | 147 | 9.35M | return Status::OK(); | 148 | 9.35M | } |
Unexecuted instantiation: statement_result.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: local_tablet_writer.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: tablet-test-base.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql_protocol_util.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql_resultset.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql_rowblock.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) ql_value.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Line | Count | Source | 143 | 22.4M | static inline CHECKED_STATUS CQLDecodeBytes(size_t len, Slice* data, std::string* val) { | 144 | 22.4M | RETURN_NOT_ENOUGH(data, len); | 145 | 22.4M | val->assign(data->cdata(), len); | 146 | 22.4M | data->remove_prefix(len); | 147 | 22.4M | return Status::OK(); | 148 | 22.4M | } |
Unexecuted instantiation: statement.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: ql_processor.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cdc_service.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_operation.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_processor.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_rpc.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_server.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_server_options.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_service.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: cql_statement.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) Unexecuted instantiation: system_query_cache.cc:yb::CQLDecodeBytes(unsigned long, yb::Slice*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) |
149 | | |
150 | | Result<int32_t> CQLDecodeLength(Slice* data); |
151 | | |
152 | | // Decode a 32-bit length from the buffer without consuming the buffer. Caller should ensure the |
153 | | // buffer size is at least 4 bytes. |
154 | 55.6M | static inline int32_t CQLDecodeLength(const void* buffer) { |
155 | 55.6M | return static_cast<int32_t>(NetworkByteOrder::Load32(buffer)); |
156 | 55.6M | } Unexecuted instantiation: tablet_server_main.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: insert-generated-rows.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_test_base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: metrics_snapshotter.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ql-test-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: audit_logger.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: eval_aggr.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: executor.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: client-test-util.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: sys_catalog_writer.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: catalog_manager_ent.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: table_handle.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ql-dml-test-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: txn-test-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: snapshot_test_util.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: admin-test-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cluster_verifier.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: load_generator.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: redis_table_test_base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: test_workload.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ts_itest-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: yb_table_test_base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_message.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: statement_result.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: local_tablet_writer.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: tablet-test-base.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ql_protocol_util.cc:yb::CQLDecodeLength(void const*) ql_resultset.cc:yb::CQLDecodeLength(void const*) Line | Count | Source | 154 | 55.6M | static inline int32_t CQLDecodeLength(const void* buffer) { | 155 | 55.6M | return static_cast<int32_t>(NetworkByteOrder::Load32(buffer)); | 156 | 55.6M | } |
Unexecuted instantiation: ql_rowblock.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ql_value.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: statement.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: ql_processor.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cdc_service.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_operation.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_processor.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_rpc.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_server.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_server_options.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_service.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: cql_statement.cc:yb::CQLDecodeLength(void const*) Unexecuted instantiation: system_query_cache.cc:yb::CQLDecodeLength(void const*) |
157 | | |
158 | | //----------------------------------- CQL value encode functions --------------------------------- |
159 | | void CQLEncodeLength(const ssize_t length, faststring* buffer); |
160 | | |
161 | | // Encode a 32-bit length into the buffer without extending the buffer. Caller should ensure the |
162 | | // buffer size is at least 4 bytes. |
163 | | void CQLEncodeLength(const ssize_t length, void* buffer); |
164 | | |
165 | | // Encode a CQL number (8, 16, 32 and 64-bit integer). <num_type> is the integer type. |
166 | | // <converter> converts the number from machine byte-order to network order and <data_type> |
167 | | // is the coverter's return type. The converter's input type <data_type> is unsigned while |
168 | | // <num_type> may be signed or unsigned. |
169 | | template<typename num_type, typename data_type> |
170 | | static inline void CQLEncodeNum( |
171 | 12.2M | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { |
172 | 12.2M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); |
173 | 12.2M | CQLEncodeLength(sizeof(num_type), buffer); |
174 | 12.2M | data_type byte_value; |
175 | 12.2M | (*converter)(&byte_value, static_cast<data_type>(val)); |
176 | 12.2M | buffer->append(&byte_value, sizeof(byte_value)); |
177 | 12.2M | } ql_value.cc:void yb::CQLEncodeNum<signed char, unsigned char>(void (*)(void*, unsigned char), signed char, yb::faststring*) Line | Count | Source | 171 | 40.8k | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 40.8k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 40.8k | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 40.8k | data_type byte_value; | 175 | 40.8k | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 40.8k | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 40.8k | } |
ql_value.cc:void yb::CQLEncodeNum<short, unsigned short>(void (*)(void*, unsigned short), short, yb::faststring*) Line | Count | Source | 171 | 21.6k | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 21.6k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 21.6k | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 21.6k | data_type byte_value; | 175 | 21.6k | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 21.6k | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 21.6k | } |
ql_value.cc:void yb::CQLEncodeNum<int, unsigned int>(void (*)(void*, unsigned int), int, yb::faststring*) Line | Count | Source | 171 | 4.34M | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 4.34M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 4.34M | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 4.34M | data_type byte_value; | 175 | 4.34M | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 4.34M | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 4.34M | } |
ql_value.cc:void yb::CQLEncodeNum<long long, unsigned long long>(void (*)(void*, unsigned long long), long long, yb::faststring*) Line | Count | Source | 171 | 7.66M | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 7.66M | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 7.66M | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 7.66M | data_type byte_value; | 175 | 7.66M | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 7.66M | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 7.66M | } |
ql_value.cc:void yb::CQLEncodeNum<unsigned long long, unsigned long long>(void (*)(void*, unsigned long long), unsigned long long, yb::faststring*) Line | Count | Source | 171 | 543 | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 543 | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 543 | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 543 | data_type byte_value; | 175 | 543 | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 543 | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 543 | } |
ql_value.cc:void yb::CQLEncodeNum<unsigned char, unsigned char>(void (*)(void*, unsigned char), unsigned char, yb::faststring*) Line | Count | Source | 171 | 130k | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 130k | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 130k | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 130k | data_type byte_value; | 175 | 130k | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 130k | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 130k | } |
ql_value.cc:void yb::CQLEncodeNum<unsigned int, unsigned int>(void (*)(void*, unsigned int), unsigned int, yb::faststring*) Line | Count | Source | 171 | 597 | void (*converter)(void *, data_type), const num_type val, faststring* buffer) { | 172 | 597 | static_assert(sizeof(data_type) == sizeof(num_type), "inconsistent num type size"); | 173 | 597 | CQLEncodeLength(sizeof(num_type), buffer); | 174 | 597 | data_type byte_value; | 175 | 597 | (*converter)(&byte_value, static_cast<data_type>(val)); | 176 | 597 | buffer->append(&byte_value, sizeof(byte_value)); | 177 | 597 | } |
|
178 | | |
179 | | // Encode a CQL floating point number (float or double). <float_type> is the floating point type. |
180 | | // <converter> converts the number from machine byte-order to network order and <data_type> |
181 | | // is the coverter's input type. The converter's input type <data_type> is an integer type. |
182 | | template<typename float_type, typename data_type> |
183 | | static inline void CQLEncodeFloat( |
184 | 999 | void (*converter)(void *, data_type), const float_type val, faststring* buffer) { |
185 | 999 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); |
186 | 999 | const data_type value = *reinterpret_cast<const data_type*>(&val); |
187 | 999 | CQLEncodeNum(converter, value, buffer); |
188 | 999 | } ql_value.cc:void yb::CQLEncodeFloat<float, unsigned int>(void (*)(void*, unsigned int), float, yb::faststring*) Line | Count | Source | 184 | 456 | void (*converter)(void *, data_type), const float_type val, faststring* buffer) { | 185 | 456 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); | 186 | 456 | const data_type value = *reinterpret_cast<const data_type*>(&val); | 187 | 456 | CQLEncodeNum(converter, value, buffer); | 188 | 456 | } |
ql_value.cc:void yb::CQLEncodeFloat<double, unsigned long long>(void (*)(void*, unsigned long long), double, yb::faststring*) Line | Count | Source | 184 | 543 | void (*converter)(void *, data_type), const float_type val, faststring* buffer) { | 185 | 543 | static_assert(sizeof(float_type) == sizeof(data_type), "inconsistent floating point type size"); | 186 | 543 | const data_type value = *reinterpret_cast<const data_type*>(&val); | 187 | 543 | CQLEncodeNum(converter, value, buffer); | 188 | 543 | } |
|
189 | | |
190 | 30.7M | static inline void CQLEncodeBytes(const std::string& val, faststring* buffer) { |
191 | 30.7M | CQLEncodeLength(val.size(), buffer); |
192 | 30.7M | buffer->append(val); |
193 | 30.7M | } Unexecuted instantiation: tablet_server_main.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: insert-generated-rows.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_test_base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: metrics_snapshotter.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql-test-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: audit_logger.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: eval_aggr.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: executor.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: client-test-util.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: sys_catalog_writer.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: catalog_manager_ent.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: table_handle.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql-dml-test-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: txn-test-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: snapshot_test_util.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: admin-test-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cluster_verifier.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: load_generator.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: redis_table_test_base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: test_workload.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ts_itest-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: yb_table_test_base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_message.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: statement_result.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: local_tablet_writer.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: tablet-test-base.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql_protocol_util.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql_resultset.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql_rowblock.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) ql_value.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Line | Count | Source | 190 | 30.7M | static inline void CQLEncodeBytes(const std::string& val, faststring* buffer) { | 191 | 30.7M | CQLEncodeLength(val.size(), buffer); | 192 | 30.7M | buffer->append(val); | 193 | 30.7M | } |
Unexecuted instantiation: statement.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: ql_processor.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cdc_service.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_operation.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_processor.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_rpc.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_server.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_server_options.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_service.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: cql_statement.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) Unexecuted instantiation: system_query_cache.cc:yb::CQLEncodeBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, yb::faststring*) |
194 | | |
195 | | //-------------------------------------------------------------------------------------------------- |
196 | | // For collections the serialized length (size in bytes -- not number of elements) depends on the |
197 | | // size of their (possibly variable-length) elements so cannot be pre-computed efficiently. |
198 | | // Therefore CQLStartCollection and CQLFinishCollection should be called before and, respectively, |
199 | | // after serializing collection elements to set the correct value |
200 | | |
201 | | // Allocates the space in the buffer for writing the correct length later and returns the buffer |
202 | | // position after (i.e. where the serialization for the collection value will begin) |
203 | 865k | static inline int32_t CQLStartCollection(faststring* buffer) { |
204 | 865k | CQLEncodeLength(0, buffer); |
205 | 865k | return static_cast<int32_t>(buffer->size()); |
206 | 865k | } Unexecuted instantiation: tablet_server_main.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: insert-generated-rows.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_test_base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: metrics_snapshotter.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql-test-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: audit_logger.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: eval_aggr.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: executor.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: client-test-util.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: sys_catalog_writer.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: catalog_manager_ent.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: table_handle.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql-dml-test-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: txn-test-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: snapshot_test_util.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: admin-test-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cluster_verifier.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: load_generator.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: redis_table_test_base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: test_workload.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ts_itest-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: yb_table_test_base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_message.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: statement_result.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: local_tablet_writer.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: tablet-test-base.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql_protocol_util.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql_resultset.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql_rowblock.cc:yb::CQLStartCollection(yb::faststring*) ql_value.cc:yb::CQLStartCollection(yb::faststring*) Line | Count | Source | 203 | 865k | static inline int32_t CQLStartCollection(faststring* buffer) { | 204 | 865k | CQLEncodeLength(0, buffer); | 205 | 865k | return static_cast<int32_t>(buffer->size()); | 206 | 865k | } |
Unexecuted instantiation: statement.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: ql_processor.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cdc_service.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_operation.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_processor.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_rpc.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_server.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_server_options.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_service.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: cql_statement.cc:yb::CQLStartCollection(yb::faststring*) Unexecuted instantiation: system_query_cache.cc:yb::CQLStartCollection(yb::faststring*) |
207 | | |
208 | | // Sets the value for the serialized size of a collection by subtracting the start position to |
209 | | // compute length and writing it at the right position in the buffer |
210 | 865k | static inline void CQLFinishCollection(int32_t start_pos, faststring* buffer) { |
211 | | // computing collection size (in bytes) |
212 | 865k | int32_t coll_size = static_cast<int32_t>(buffer->size()) - start_pos; |
213 | | |
214 | | // writing the collection size in bytes to the length component of the CQL value |
215 | 865k | int32_t pos = start_pos - sizeof(int32_t); // subtracting size of length component |
216 | 865k | NetworkByteOrder::Store32(&(*buffer)[pos], static_cast<uint32_t>(coll_size)); |
217 | 865k | } Unexecuted instantiation: tablet_server_main.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: insert-generated-rows.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_test_base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: metrics_snapshotter.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql-test-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: audit_logger.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: eval_aggr.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: executor.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: client-test-util.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: sys_catalog_writer.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: catalog_manager_ent.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: table_handle.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql-dml-test-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: txn-test-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: snapshot_test_util.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: admin-test-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cluster_verifier.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: load_generator.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: redis_table_test_base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: test_workload.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ts_itest-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: yb_table_test_base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_message.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: statement_result.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: local_tablet_writer.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: tablet-test-base.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql_protocol_util.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql_resultset.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql_rowblock.cc:yb::CQLFinishCollection(int, yb::faststring*) ql_value.cc:yb::CQLFinishCollection(int, yb::faststring*) Line | Count | Source | 210 | 865k | static inline void CQLFinishCollection(int32_t start_pos, faststring* buffer) { | 211 | | // computing collection size (in bytes) | 212 | 865k | int32_t coll_size = static_cast<int32_t>(buffer->size()) - start_pos; | 213 | | | 214 | | // writing the collection size in bytes to the length component of the CQL value | 215 | 865k | int32_t pos = start_pos - sizeof(int32_t); // subtracting size of length component | 216 | 865k | NetworkByteOrder::Store32(&(*buffer)[pos], static_cast<uint32_t>(coll_size)); | 217 | 865k | } |
Unexecuted instantiation: statement.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: ql_processor.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cdc_service.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_operation.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_processor.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_rpc.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_server.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_server_options.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_service.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: cql_statement.cc:yb::CQLFinishCollection(int, yb::faststring*) Unexecuted instantiation: system_query_cache.cc:yb::CQLFinishCollection(int, yb::faststring*) |
218 | | |
219 | 27.6M | static inline void Store8(void* p, uint8_t v) { |
220 | 27.6M | *static_cast<uint8_t*>(p) = v; |
221 | 27.6M | } Unexecuted instantiation: tablet_server_main.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: insert-generated-rows.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: tablet-split-itest-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_test_base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: metrics_snapshotter.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql-test-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: audit_logger.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: eval_aggr.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: executor.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: client-test-util.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: sys_catalog_writer.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: catalog_manager_ent.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: table_handle.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql-dml-test-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: txn-test-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: snapshot_test_util.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: admin-test-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cluster_verifier.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: load_generator.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: redis_table_test_base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: test_workload.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ts_itest-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: yb_table_test_base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cdcsdk_test_base.cc:yb::Store8(void*, unsigned char) cql_message.cc:yb::Store8(void*, unsigned char) Line | Count | Source | 219 | 27.4M | static inline void Store8(void* p, uint8_t v) { | 220 | 27.4M | *static_cast<uint8_t*>(p) = v; | 221 | 27.4M | } |
Unexecuted instantiation: statement_result.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: local_tablet_writer.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: tablet-test-base.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql_protocol_util.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql_resultset.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql_rowblock.cc:yb::Store8(void*, unsigned char) ql_value.cc:yb::Store8(void*, unsigned char) Line | Count | Source | 219 | 171k | static inline void Store8(void* p, uint8_t v) { | 220 | 171k | *static_cast<uint8_t*>(p) = v; | 221 | 171k | } |
Unexecuted instantiation: statement.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: ql_processor.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cdc_service.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_operation.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_processor.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_rpc.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_server.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_server_options.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_service.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: cql_statement.cc:yb::Store8(void*, unsigned char) Unexecuted instantiation: system_query_cache.cc:yb::Store8(void*, unsigned char) |
222 | | |
223 | | //----------------------------------- CQL value decode functions --------------------------------- |
224 | 36.2M | static inline uint8_t Load8(const void* p) { |
225 | 36.2M | return *static_cast<const uint8_t*>(p); |
226 | 36.2M | } Unexecuted instantiation: tablet_server_main.cc:yb::Load8(void const*) Unexecuted instantiation: insert-generated-rows.cc:yb::Load8(void const*) Unexecuted instantiation: tablet-split-itest-base.cc:yb::Load8(void const*) Unexecuted instantiation: cql_test_base.cc:yb::Load8(void const*) Unexecuted instantiation: metrics_snapshotter.cc:yb::Load8(void const*) Unexecuted instantiation: ql-test-base.cc:yb::Load8(void const*) Unexecuted instantiation: audit_logger.cc:yb::Load8(void const*) Unexecuted instantiation: eval_aggr.cc:yb::Load8(void const*) Unexecuted instantiation: executor.cc:yb::Load8(void const*) Unexecuted instantiation: client-test-util.cc:yb::Load8(void const*) Unexecuted instantiation: sys_catalog_writer.cc:yb::Load8(void const*) Unexecuted instantiation: catalog_manager_ent.cc:yb::Load8(void const*) Unexecuted instantiation: table_handle.cc:yb::Load8(void const*) Unexecuted instantiation: ql-dml-test-base.cc:yb::Load8(void const*) Unexecuted instantiation: txn-test-base.cc:yb::Load8(void const*) Unexecuted instantiation: snapshot_test_util.cc:yb::Load8(void const*) Unexecuted instantiation: admin-test-base.cc:yb::Load8(void const*) Unexecuted instantiation: cluster_verifier.cc:yb::Load8(void const*) Unexecuted instantiation: load_generator.cc:yb::Load8(void const*) Unexecuted instantiation: redis_table_test_base.cc:yb::Load8(void const*) Unexecuted instantiation: test_workload.cc:yb::Load8(void const*) Unexecuted instantiation: ts_itest-base.cc:yb::Load8(void const*) Unexecuted instantiation: yb_table_test_base.cc:yb::Load8(void const*) Unexecuted instantiation: cdcsdk_test_base.cc:yb::Load8(void const*) cql_message.cc:yb::Load8(void const*) Line | Count | Source | 224 | 36.0M | static inline uint8_t Load8(const void* p) { | 225 | 36.0M | return *static_cast<const uint8_t*>(p); | 226 | 36.0M | } |
Unexecuted instantiation: statement_result.cc:yb::Load8(void const*) Unexecuted instantiation: local_tablet_writer.cc:yb::Load8(void const*) Unexecuted instantiation: tablet-test-base.cc:yb::Load8(void const*) Unexecuted instantiation: ql_protocol_util.cc:yb::Load8(void const*) Unexecuted instantiation: ql_resultset.cc:yb::Load8(void const*) Unexecuted instantiation: ql_rowblock.cc:yb::Load8(void const*) ql_value.cc:yb::Load8(void const*) Line | Count | Source | 224 | 155k | static inline uint8_t Load8(const void* p) { | 225 | 155k | return *static_cast<const uint8_t*>(p); | 226 | 155k | } |
Unexecuted instantiation: statement.cc:yb::Load8(void const*) Unexecuted instantiation: ql_processor.cc:yb::Load8(void const*) Unexecuted instantiation: cdc_service.cc:yb::Load8(void const*) Unexecuted instantiation: cql_operation.cc:yb::Load8(void const*) Unexecuted instantiation: cql_processor.cc:yb::Load8(void const*) Unexecuted instantiation: cql_rpc.cc:yb::Load8(void const*) Unexecuted instantiation: cql_server.cc:yb::Load8(void const*) Unexecuted instantiation: cql_server_options.cc:yb::Load8(void const*) Unexecuted instantiation: cql_service.cc:yb::Load8(void const*) Unexecuted instantiation: cql_statement.cc:yb::Load8(void const*) Unexecuted instantiation: system_query_cache.cc:yb::Load8(void const*) |
227 | | |
228 | | } // namespace yb |
229 | | |
230 | | #endif // YB_COMMON_QL_PROTOCOL_UTIL_H |