github-actions[bot] commented on code in PR #63730:
URL: https://github.com/apache/doris/pull/63730#discussion_r3310172531
##########
be/src/exprs/function/function_jsonb.cpp:
##########
@@ -2725,7 +2724,7 @@ class FunctionJsonbRemove : public IFunction {
Status execute_impl(FunctionContext* context, Block& block, const
ColumnNumbers& arguments,
uint32_t result, size_t input_rows_count) const
override {
- DCHECK_GE(arguments.size(), 2);
+ DORIS_CHECK_GE(arguments.size(), 2);
Review Comment:
This check now fires before the existing validation below, so `json_remove`
with fewer than two arguments no longer returns
`Status::InvalidArgument("json_remove requires at least 2 arguments")` in
Release builds; it throws a fatal check exception instead. Since this function
is variadic (`get_number_of_arguments() == 0`, `is_variadic() == true`) and
already has a user-facing arity check immediately after this line, the arity
failure is not an invariant for `DORIS_CHECK_GE`. Please leave this as a
non-fatal validation path, for example by removing this `DORIS_CHECK_GE` and
relying on the existing `if (arguments.size() < 2)` branch.
--
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]