diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-10-29 17:33:23 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-10-29 18:03:17 +0300 |
commit | 82bc38af7f4b2e351427b349157a7ea0702b6a2c (patch) | |
tree | 33a414bc494eeebb48319cfc1fe336d2db01c70c | |
parent | 42ef71fba8e1b43991e94d2c7029cdca3b913509 (diff) | |
download | ydb-82bc38af7f4b2e351427b349157a7ea0702b6a2c.tar.gz |
KIKIMR-19824: fix different schemas usage on reading
-rw-r--r-- | ydb/core/tx/columnshard/engines/reader/plain_reader/committed_assembler.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ydb/core/tx/columnshard/engines/reader/plain_reader/committed_assembler.cpp b/ydb/core/tx/columnshard/engines/reader/plain_reader/committed_assembler.cpp index eeae6e9b3d..8cad68a15c 100644 --- a/ydb/core/tx/columnshard/engines/reader/plain_reader/committed_assembler.cpp +++ b/ydb/core/tx/columnshard/engines/reader/plain_reader/committed_assembler.cpp @@ -15,8 +15,16 @@ bool TCommittedAssembler::DoExecute() { bool TCommittedAssembler::DoApply(IDataReader& owner) const { auto& source = owner.GetMeAs<TPlainReadData>().GetSourceByIdxVerified(SourceIdx); - source.InitFilterStageData(nullptr, EarlyFilter, NArrow::ExtractColumns(ResultBatch, source.GetFetchingPlan().GetFilterStage()->GetSchema(), true)); - source.InitFetchStageData(NArrow::ExtractColumnsValidate(ResultBatch, source.GetFetchingPlan().GetFetchingStage()->GetColumnNamesVector())); + if (source.GetFetchingPlan().GetFilterStage()->GetSchema()) { + source.InitFilterStageData(nullptr, EarlyFilter, NArrow::ExtractColumns(ResultBatch, source.GetFetchingPlan().GetFilterStage()->GetSchema(), true)); + } else { + source.InitFilterStageData(nullptr, EarlyFilter, nullptr); + } + if (source.GetFetchingPlan().GetFetchingStage()->GetSchema()) { + source.InitFetchStageData(NArrow::ExtractColumns(ResultBatch, source.GetFetchingPlan().GetFetchingStage()->GetSchema(), true)); + } else { + source.InitFetchStageData(nullptr); + } return true; } |