starocean999 commented on code in PR #17315:
URL: https://github.com/apache/doris/pull/17315#discussion_r1122589837


##########
be/src/vec/aggregate_functions/aggregate_function_window.h:
##########
@@ -274,6 +274,8 @@ struct LeadLagData {
                 const auto* nullable_column = assert_cast<const 
ColumnNullable*>(column);
                 if (nullable_column->is_null_at(0)) {
                     _default_value.reset();
+                } else {
+                    
_default_value.set_value(nullable_column->get_nested_column_ptr(), 0);

Review Comment:
   new nereids planner may add a cast to literal string internally like:
   `select id, create_time, lead(create_time, 1, '2022-09-06 00:00:00') over
                             (order by create_time desc) as "prev_time" from 
test1; `
   ->
   `select id, create_time, lead(create_time, 1, cast('2022-09-06 00:00:00' as 
datetime)) over
                             (order by create_time desc) as "prev_time" from 
test1; `
   
   so, the above code is added for compatibility of nereids planner



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

Reply via email to