163952 {
163953 auto begins = FlatVector::GetData<const idx_t>(bounds.
data[FRAME_BEGIN]);
163954 auto ends = FlatVector::GetData<const idx_t>(bounds.
data[FRAME_END]);
163955 auto peer_begin = FlatVector::GetData<const idx_t>(bounds.
data[PEER_BEGIN]);
163956 auto peer_end = FlatVector::GetData<const idx_t>(bounds.
data[PEER_END]);
163957
163958 for (
idx_t i = 0, cur_row = row_idx; i < count; ++i, ++cur_row) {
163959 idx_t nframes = 0;
163961 auto begin = begins[i];
163962 auto end = ends[i];
163963 frames[nframes++] = FrameBounds(begin, end);
163964 } else {
163965
163966
163967
163968
163969
163970
163971
163972
163973
163974
163975
163976
163977
163978
163979
163980
163981
163982
163983
163984
163985 const auto frame_begin = begins[i];
163986 const auto frame_end = ends[i];
163987 auto begin = frame_begin;
163988 auto end = (
exclude_mode == WindowExcludeMode::CURRENT_ROW) ? cur_row : peer_begin[i];
163989 end = MinValue(end, frame_end);
163990 end = MaxValue(end, frame_begin);
163991 frames[nframes++] = FrameBounds(begin, end);
163992
163993
163994
163996 begin = MinValue(MaxValue(cur_row, frame_begin), frame_end);
163997 end = MaxValue(MinValue(cur_row + 1, frame_end), frame_begin);
163998 frames[nframes++] = FrameBounds(begin, end);
163999 }
164000
164001
164002 end = frame_end;
164003 begin = (
exclude_mode == WindowExcludeMode::CURRENT_ROW) ? (cur_row + 1) : peer_end[i];
164004 begin = MaxValue(begin, frame_begin);
164005 begin = MinValue(begin, frame_end);
164006 frames[nframes++] = FrameBounds(begin, end);
164007 }
164008
164009 operation(i);
164010 }
164011 }
vector< Vector > data
The vectors owned by the DataChunk.
Definition duckdb.hpp:11445
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237