Skip to content

Commit 4435c60

Browse files
committed
fix per comment
Signed-off-by: yan zhang <[email protected]>
1 parent 2281eea commit 4435c60

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

be/src/util/variant.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Status VariantMetadata::_build_lookup_index() const {
143143
dict_strings.emplace_back(field_key); \
144144
offset = next_offset; \
145145
} \
146+
_lookup_index.has_built = true; \
146147
if (string_base + offset > _metadata.data() + _metadata.size()) { \
147148
return Status::VariantError("Variant string out of range"); \
148149
} \
@@ -155,8 +156,6 @@ Status VariantMetadata::_build_lookup_index() const {
155156
DECODE_VALUE_OFFSET(3);
156157
DECODE_VALUE_OFFSET(4);
157158
}
158-
159-
_lookup_index.has_built = true;
160159
return Status::OK();
161160
}
162161

be/src/util/variant_converter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Status cast_variant_to_bool(const VariantRowValue& variant, ColumnBuilder<TYPE_B
4141
if (parsed != StringParser::PARSE_SUCCESS) {
4242
const bool casted = StringParser::string_to_bool(str_value, len, &parsed);
4343
if (parsed != StringParser::PARSE_SUCCESS) {
44-
return Status::VariantError(fmt::format("Failed to cast string '{}' to BOOLEAN", str_value));
44+
return Status::VariantError(fmt::format("Failed to cast string '{}' to BOOLEAN", str));
4545
}
4646
result.append(casted);
4747
} else {

0 commit comments

Comments
 (0)