cambyzju commented on code in PR #37681:
URL: https://github.com/apache/doris/pull/37681#discussion_r1677263687


##########
be/src/vec/functions/function_utility.cpp:
##########
@@ -62,31 +62,26 @@ class FunctionSleep : public IFunction {
     size_t get_number_of_arguments() const override { return 1; }
 
     DataTypePtr get_return_type_impl(const DataTypes& arguments) const 
override {
-        if (arguments[0].get()->is_nullable()) {
+        if (arguments[0]->is_nullable()) {
             return make_nullable(std::make_shared<DataTypeUInt8>());
         }
         return std::make_shared<DataTypeUInt8>();
     }
 
     bool use_default_implementation_for_nulls() const override { return false; 
}
 
+    // Sleep function should not be executed during open stage, this will 
makes fragment prepare
+    // waiting too long, so we do not use default impl.
     bool use_default_implementation_for_constants() const override { return 
false; }
 
     Status execute_impl(FunctionContext* context, Block& block, const 
ColumnNumbers& arguments,
                         size_t result, size_t input_rows_count) const override 
{
-        ColumnPtr& argument_column = 
block.get_by_position(arguments[0]).column;
+        const auto& argument_column =

Review Comment:
   there are already lots of convert_to_full_column_if_const used, maybe next 
time, we refractor all these used is better.



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