Skip to content

Commit ffae242

Browse files
author
Vadim Averin
committed
Adapt LLVM to new interface of simple nodes
1 parent d4cd728 commit ffae242

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ class TSimpleStatefulWideFlowCodegeneratorNode
2828
}
2929

3030
EProcessResult DoProcessWrapper(NUdf::TUnboxedValue &state, TComputationContext& ctx, EFetchResult fetchRes, NUdf::TUnboxedValuePod* values, size_t width) const {
31-
TVector<NUdf::TUnboxedValue> valuesVec(width, NUdf::TUnboxedValuePod());
31+
TVector<NUdf::TUnboxedValuePod> inputVec(values, values + width);
32+
Fill(values, values + width, NUdf::TUnboxedValuePod());
33+
TVector<NUdf::TUnboxedValue*> outputPtrsVec(width, nullptr);
3234
for (size_t pos = 0; pos < width; pos++) {
33-
valuesVec[pos] = values[pos];
35+
outputPtrsVec[pos] = static_cast<NUdf::TUnboxedValue*>(values + pos);
3436
}
35-
TVector<NUdf::TUnboxedValue*> valuePtrsVec(width, nullptr);
37+
auto *const *inputPtrs = static_cast<const TDerived*>(this)->PrepareInput(*static_cast<TState*>(state.GetRawPtr()), ctx, outputPtrsVec.data());
3638
for (size_t pos = 0; pos < width; pos++) {
37-
valuePtrsVec[pos] = valuesVec.data() + pos;
39+
if(auto in = inputPtrs[pos]) {
40+
*in = inputVec[pos];
41+
}
3842
}
39-
auto res = static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, valuePtrsVec.data());
40-
for (size_t pos = 0; pos < width; pos++) {
41-
values[pos] = valuesVec[pos].Release();
42-
}
43-
return res;
43+
return static_cast<const TDerived*>(this)->DoProcess(*static_cast<TState*>(state.GetRawPtr()), ctx, fetchRes, outputPtrsVec.data());
4444
}
4545

4646
public:

0 commit comments

Comments
 (0)