aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraneporada <aneporada@ydb.tech>2023-09-07 17:37:47 +0300
committeraneporada <aneporada@ydb.tech>2023-09-07 17:53:38 +0300
commit8f4f9778b4ed5a25101a5f1daa99e7b0dd497305 (patch)
tree9e09e54d452026126c31e1a91a317ad425a2a6be
parent34c1795da760c434a94267f4b22838d7004124b6 (diff)
downloadydb-8f4f9778b4ed5a25101a5f1daa99e7b0dd497305.tar.gz
Adjust argument count for pg deserialize aggregation method
initial
-rw-r--r--ydb/library/yql/parser/pg_wrapper/arrow.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/ydb/library/yql/parser/pg_wrapper/arrow.h b/ydb/library/yql/parser/pg_wrapper/arrow.h
index 16aa5c8426..fbed8b95c9 100644
--- a/ydb/library/yql/parser/pg_wrapper/arrow.h
+++ b/ydb/library/yql/parser/pg_wrapper/arrow.h
@@ -113,10 +113,11 @@ struct TInputArgsAccessor {
std::array<const ui32*, TArgsPolicy::IsFixedArg.size()> StringOffsetsArrays;
std::array<const ui8*, TArgsPolicy::IsFixedArg.size()> StringDataArrays;
- void Bind(const std::vector<arrow::Datum>& values, size_t skipArgs = 0) {
+ void Bind(const std::vector<arrow::Datum>& values, size_t skipArgs = 0, TMaybe<size_t> realArgsCount = {}) {
if constexpr (!TArgsPolicy::VarArgs) {
- Y_ENSURE(TArgsPolicy::IsFixedArg.size() == values.size() + skipArgs);
- for (size_t j = skipArgs; j < TArgsPolicy::IsFixedArg.size(); ++j) {
+ const size_t argCount = realArgsCount.GetOrElse(TArgsPolicy::IsFixedArg.size());
+ Y_ENSURE(argCount == values.size() + skipArgs);
+ for (size_t j = skipArgs; j < argCount; ++j) {
IsScalar[j] = values[j - skipArgs].is_scalar();
if (IsScalar[j]) {
const auto& scalar = *values[j - skipArgs].scalar();
@@ -1023,7 +1024,7 @@ SkipCall:;
Values_.clear();
Values_.push_back(NKikimr::NMiniKQL::TArrowBlock::From(columns[StateColumn_]).GetDatum());
if constexpr (HasDeserialize) {
- DeserializeAccessor_.Bind(Values_, 0);
+ DeserializeAccessor_.Bind(Values_, 0, 1);
} else {
CombineAccessor_.Bind(Values_, 1);
}