amorynan commented on code in PR #52797:
URL: https://github.com/apache/doris/pull/52797#discussion_r2188902737


##########
be/src/vec/functions/function_jsonb.cpp:
##########
@@ -1346,19 +1346,30 @@ struct JsonbLengthUtil {
         bool is_const = false;
         std::tie(path_column, is_const) =
                 unpack_if_const(block.get_by_position(arguments[1]).column);
+
+        auto null_map = ColumnUInt8::create(input_rows_count, 0);
+        auto return_type = block.get_data_type(result);
+        MutableColumnPtr res = return_type->create_column();
+
         JsonbPath path;
         if (is_const) {
+            if (path_column->is_null_at(0)) {
+                for (size_t i = 0; i < input_rows_count; ++i) {
+                    null_map->get_data()[i] = 1;
+                    res->insert_data(nullptr, 0);
+                }
+
+                block.replace_by_position(
+                        result, ColumnNullable::create(std::move(res), 
std::move(null_map)));
+                return Status::OK();

Review Comment:
   before here return what result we could get in this situation ?



-- 
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]

Reply via email to