Skip to content

Commit d4cd728

Browse files
author
Vadim Averin
committed
Fix introduced bugs
1 parent 5a99902 commit d4cd728

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

ydb/library/yql/minikql/comp_nodes/mkql_skip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideSkipWrapp
136136
return skipCount == 0 ? output : ctx.WideFields.data() + StubsIndex;
137137
}
138138

139-
EProcessResult DoProcess(ui64& skipCount, TComputationContext&, EFetchResult fetchRes, NUdf::TUnboxedValue*const*, NUdf::TUnboxedValue*const*) const {
139+
EProcessResult DoProcess(ui64& skipCount, TComputationContext&, EFetchResult fetchRes, NUdf::TUnboxedValue*const*) const {
140140
if (fetchRes == EFetchResult::One && skipCount) {
141141
skipCount--;
142142
return EProcessResult::Fetch;

ydb/library/yql/minikql/comp_nodes/mkql_take.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideTakeWrapp
111111
return takeCount != 0 ? output : nullptr;
112112
}
113113

114-
EProcessResult DoProcess(ui64& takeCount, TComputationContext& , EFetchResult fetchRes, NUdf::TUnboxedValue*const*, NUdf::TUnboxedValue*const*) const {
114+
EProcessResult DoProcess(ui64& takeCount, TComputationContext& , EFetchResult fetchRes, NUdf::TUnboxedValue*const*) const {
115115
if (takeCount == 0) {
116116
return EProcessResult::Finish;
117117
} else if (fetchRes == EFetchResult::One) {

ydb/library/yql/minikql/comp_nodes/mkql_wide_filter.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideFilterWit
156156
return limit != 0 ? PrepareArguments(ctx, output) : nullptr;
157157
}
158158

159-
EProcessResult DoProcess(ui64& limit, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const*, NUdf::TUnboxedValue*const* values) const {
159+
EProcessResult DoProcess(ui64& limit, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const* output) const {
160160
if (limit == 0) {
161161
return EProcessResult::Finish;
162162
}
163163
if (fetchRes == EFetchResult::One) {
164164
if (Predicate->GetValue(ctx).Get<bool>()) {
165-
FillOutputs(ctx, values);
165+
FillOutputs(ctx, output);
166166
limit--;
167167
return EProcessResult::One;
168168
}
@@ -198,10 +198,10 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideTakeWhile
198198
}
199199

200200
NUdf::TUnboxedValue*const* PrepareInput(bool& stop, TComputationContext& ctx, NUdf::TUnboxedValue*const* output) const {
201-
return !stop ? output : PrepareArguments(ctx, output);
201+
return !stop ? PrepareArguments(ctx, output) : nullptr;
202202
}
203203

204-
TBaseComputation::EProcessResult DoProcess(bool& stop, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const*, NUdf::TUnboxedValue*const* values) const {
204+
TBaseComputation::EProcessResult DoProcess(bool& stop, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const* output) const {
205205
if (stop) {
206206
return TBaseComputation::EProcessResult::Finish;
207207
}
@@ -211,7 +211,7 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideTakeWhile
211211
stop = true;
212212
}
213213
if (Inclusive || predicate) {
214-
FillOutputs(ctx, values);
214+
FillOutputs(ctx, output);
215215
return TBaseComputation::EProcessResult::One;
216216
}
217217
return TBaseComputation::EProcessResult::Finish;
@@ -241,18 +241,18 @@ using TBaseComputation = TSimpleStatefulWideFlowCodegeneratorNode<TWideSkipWhile
241241
start = false;
242242
}
243243

244-
NUdf::TUnboxedValue*const* PrepareInput(bool&, TComputationContext&, NUdf::TUnboxedValue*const* output) const {
245-
return output;
244+
NUdf::TUnboxedValue*const* PrepareInput(bool& start, TComputationContext& ctx, NUdf::TUnboxedValue*const* output) const {
245+
return start ? output : PrepareArguments(ctx, output);
246246
}
247247

248-
TBaseComputation::EProcessResult DoProcess(bool& start, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const*, NUdf::TUnboxedValue*const* values) const {
248+
TBaseComputation::EProcessResult DoProcess(bool& start, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValue*const* output) const {
249249
if (!start && fetchRes == EFetchResult::One) {
250250
const bool predicate = Predicate->GetValue(ctx).Get<bool>();
251251
if (!predicate) {
252252
start = true;
253253
}
254254
if (!Inclusive && !predicate) {
255-
FillOutputs(ctx, values);
255+
FillOutputs(ctx, output);
256256
return TBaseComputation::EProcessResult::One;
257257
}
258258
return TBaseComputation::EProcessResult::Fetch;

ydb/library/yql/minikql/computation/mkql_computation_node_codegen_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TSimpleStatefulWideFlowCodegeneratorNode
3636
for (size_t pos = 0; pos < width; pos++) {
3737
valuePtrsVec[pos] = valuesVec.data() + pos;
3838
}
39-
auto res = static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, valuePtrsVec.data(), valuePtrsVec.data());
39+
auto res = static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, valuePtrsVec.data());
4040
for (size_t pos = 0; pos < width; pos++) {
4141
values[pos] = valuesVec[pos].Release();
4242
}
@@ -54,7 +54,7 @@ class TSimpleStatefulWideFlowCodegeneratorNode
5454
while (res == EProcessResult::Fetch) {
5555
auto *const *input = static_cast<const TDerived*>(this)->PrepareInput(*static_cast<TState*>(state.GetRawPtr()), ctx, output);
5656
auto fetchRes = input ? SourceFlow->FetchValues(ctx, input) : EFetchResult::One;
57-
res = static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, input, output);
57+
res = static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, output);
5858
}
5959
return static_cast<EFetchResult>(res);
6060
}

0 commit comments

Comments
 (0)