HappenLee commented on code in PR #46181:
URL: https://github.com/apache/doris/pull/46181#discussion_r1910485439
##########
be/src/pipeline/exec/analytic_sink_operator.cpp:
##########
@@ -30,10 +34,74 @@ Status AnalyticSinkLocalState::init(RuntimeState* state,
LocalSinkStateInfo& inf
RETURN_IF_ERROR(PipelineXSinkLocalState<AnalyticSharedState>::init(state,
info));
SCOPED_TIMER(exec_time_counter());
SCOPED_TIMER(_init_timer);
- _evaluation_timer = ADD_TIMER(profile(), "GetPartitionBoundTime");
+ _evaluation_timer = ADD_TIMER(profile(), "EvaluationTime");
_compute_agg_data_timer = ADD_TIMER(profile(), "ComputeAggDataTime");
_compute_partition_by_timer = ADD_TIMER(profile(),
"ComputePartitionByTime");
_compute_order_by_timer = ADD_TIMER(profile(), "ComputeOrderByTime");
+ _compute_order_by_function_timer = ADD_TIMER(profile(),
"ComputeOrderByFunctionTime");
+ _partition_search_timer = ADD_TIMER(profile(), "PartitionSearchTime");
+ _order_search_timer = ADD_TIMER(profile(), "OrderSearchTime");
+ _remove_rows_timer = ADD_TIMER(profile(), "RemoveRowsTime");
+ _remove_rows = ADD_COUNTER(profile(), "RemoveRows", TUnit::UNIT);
+ _remove_count = ADD_COUNTER(profile(), "RemoveCount", TUnit::UNIT);
+ _blocks_memory_usage =
+ profile()->AddHighWaterMarkCounter("Blocks", TUnit::BYTES,
"MemoryUsage", 1);
+ _agg_arena_pool = std::make_unique<vectorized::Arena>();
+ auto& p = _parent->cast<AnalyticSinkOperatorX>();
+ if (!p._has_window) { //haven't set window, Unbounded: [unbounded
preceding,unbounded following]
+ // For window frame `ROWS|RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING`
+ _executor.get_next_impl =
&AnalyticSinkLocalState::_get_next_for_partition;
+ } else if (p._has_range_window) {
+ if (!p._has_window_start && !p._has_window_end) {
Review Comment:
why try to do the work in FE?better add the check in FE set !has_window?
consider update
--
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]