xiedeyantu commented on code in PR #33272: URL: https://github.com/apache/doris/pull/33272#discussion_r1555216075
########## be/src/vec/functions/function_string.h: ########## @@ -294,6 +294,72 @@ struct SubstringUtil { } }; +class FunctionStrcmp : public IFunction { +public: + static constexpr auto name = "strcmp"; + + static FunctionPtr create() { return std::make_shared<FunctionStrcmp>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 2; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + if (arguments[0]->is_nullable() || arguments[1]->is_nullable()) { + return make_nullable(std::make_shared<DataTypeInt16>()); + } + return std::make_shared<DataTypeInt16>(); Review Comment: @HappenLee fixed, please review -- 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