yiguolei commented on code in PR #55779:
URL: https://github.com/apache/doris/pull/55779#discussion_r2335312297
##########
be/src/vec/functions/function_jsonb.cpp:
##########
@@ -837,9 +836,8 @@ struct JsonbExtractStringImpl {
StringOP::push_value_string(std::string_view(find_result.value->typeName()), i,
res_data, res_offsets);
return;
- }
-
- if constexpr (std::is_same_v<DataTypeJsonb, ReturnType>) {
+ } else {
Review Comment:
struct JsonbTypeType {
using T = std::string;
using ReturnType = DataTypeString;
using ColumnType = ColumnString;
static const bool only_check_exists = false;
static const bool only_get_type = true;
static const bool no_quotes = false;
};
struct JsonbExtractJsonb : public JsonbExtractStringImpl<JsonbTypeJson> {
static constexpr auto name = "jsonb_extract";
static constexpr auto alias = "json_extract";
};
struct JsonbExtractJsonbNoQuotes : public
JsonbExtractStringImpl<JsonbTypeJsonNoQuotes> {
static constexpr auto name = "jsonb_extract_no_quotes";
static constexpr auto alias = "json_extract_no_quotes";
};
struct JsonbType : public JsonbExtractStringImpl<JsonbTypeType> {
static constexpr auto name = "json_type";
static constexpr auto alias = "jsonb_type";
};
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]