aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSemyon <yentsovsemyon@ydb.tech>2025-03-31 13:19:04 +0300
committerGitHub <noreply@github.com>2025-03-31 13:19:04 +0300
commit582fbd6e3fe4cce8836edade42eb253b9548ef1f (patch)
tree7dfefc3e612185c2eafa889eb493aee0091c3725
parentc47a3afd15200cc3a6e0ecbf3b82d08fbdd9d230 (diff)
downloadydb-582fbd6e3fe4cce8836edade42eb253b9548ef1f.tar.gz
verify empty chunks (#16451)
-rw-r--r--ydb/core/tx/columnshard/engines/reader/common_reader/iterator/default_fetching.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/default_fetching.h b/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/default_fetching.h
index 201e35623c8..4a0cc71cb5f 100644
--- a/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/default_fetching.h
+++ b/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/default_fetching.h
@@ -6,11 +6,13 @@ namespace NKikimr::NOlap::NReader::NCommon {
class TDefaultFetchLogic: public IKernelFetchLogic {
private:
using TBase = IKernelFetchLogic;
+ std::optional<bool> IsEmptyChunks;
std::shared_ptr<NArrow::NAccessor::TColumnLoader> GetColumnLoader(const std::shared_ptr<NCommon::IDataSource>& source) const {
if (auto loader = source->GetSourceSchema()->GetColumnLoaderOptional(GetEntityId())) {
return loader;
}
+ AFL_VERIFY(IsEmptyChunks && *IsEmptyChunks);
return source->GetContext()->GetReadMetadata()->GetResultSchema()->GetColumnLoaderVerified(GetEntityId());
}
@@ -77,6 +79,7 @@ private:
virtual void DoStart(TReadActionsCollection& nextRead, TFetchingResultContext& context) override {
auto source = context.GetSource();
auto columnChunks = source->GetStageData().GetPortionAccessor().GetColumnChunksPointers(GetEntityId());
+ IsEmptyChunks.emplace(columnChunks.empty());
if (columnChunks.empty()) {
ColumnChunks.emplace_back(source->GetRecordsCount(),
TPortionDataAccessor::TAssembleBlobInfo(source->GetRecordsCount(), GetColumnLoader(context.GetSource())->GetDefaultValue()));