zhiqiang-hhhh commented on code in PR #33968: URL: https://github.com/apache/doris/pull/33968#discussion_r1574606844
########## be/src/vec/functions/function_ip.h: ########## @@ -787,15 +787,57 @@ class FunctionIPv4CIDRToRange : public IFunction { static constexpr UInt8 max_cidr_mask = IPV4_BINARY_LENGTH * 8; - for (size_t i = 0; i < input_rows_count; ++i) { - auto ip = vec_ip_input[i]; - auto cidr = col_const ? vec_cidr_input[0] : vec_cidr_input[i]; - if (0 <= cidr && cidr <= max_cidr_mask) { - auto range = apply_cidr_mask(ip, cidr); - vec_lower_range_output[i] = range.first; - vec_upper_range_output[i] = range.second; + if (ip_col_const) { + auto ip = vec_ip_input[0]; + if (cidr_col_const) { Review Comment: this branch is unnecessary. If both columns are const column, arguments will be converted to non-const column. ref: https://github.com/apache/doris/blob/a36a369294243fe7e94b17c226377ddfb69970ad/be/src/vec/functions/function.cpp#L124 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org