HappenLee commented on code in PR #18369:
URL: https://github.com/apache/doris/pull/18369#discussion_r1164933651
##########
be/src/vec/functions/function.h:
##########
@@ -300,12 +302,16 @@ class IFunctionBuilder {
using FunctionBuilderPtr = std::shared_ptr<IFunctionBuilder>;
+/// used in function_factory. when we register a function, save a builder. to
get a function, to get a builder.
+/// will use DefaultFunctionBuilder as the default builder in function's
registration if we didn't explicitly specify.
class FunctionBuilderImpl : public IFunctionBuilder {
public:
- FunctionBasePtr build(const ColumnsWithTypeAndName& arguments,
- const DataTypePtr& return_type) const final {
+ FunctionBasePtr build(const ColumnsWithTypeAndName& arguments, const
DataTypePtr& return_type,
+ const bool skip_type_check = false) const final {
const DataTypePtr& func_return_type = get_return_type(arguments);
- DCHECK(return_type->equals(*func_return_type) ||
+ // check return types equal.
+ DCHECK(skip_type_check /*iff we did function replacement in
exec_version 2*/ ||
Review Comment:
which case we should skip the type check ?
--
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]