Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Sep 12, 2024
1 parent 0024fc0 commit 3d6f060
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ydb/core/tx/columnshard/engines/ut/helper.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
#include "helper.h"
#include <ydb/core/formats/arrow/simple_arrays_cache.h>

namespace NKikimr::NOlap::NEngines::NTest {

NKikimrTxColumnShard::TLogicalMetadata TLocalHelper::GetMetaProto() {
NKikimrTxColumnShard::TLogicalMetadata result;
result.SetDirtyWriteTimeSeconds(TInstant::Now().Seconds());

std::vector<std::shared_ptr<arrow::Array>> columns;
std::vector<std::shared_ptr<arrow::Field>> fields = { std::make_shared<arrow::Field>("1", arrow::uint64()) };
for (auto&& i : fields) {
columns.emplace_back(NArrow::TThreadSimpleArraysCache::Get(i->type(), NArrow::DefaultScalar(i->type()), 1));
}
auto batch = arrow::RecordBatch::Make(std::make_shared<arrow::Schema>(fields), 1, columns);

NArrow::TFirstLastSpecialKeys flKeys = NArrow::TFirstLastSpecialKeys(batch);
result.SetSpecialKeysRawData(flKeys.SerializeToString());
return result;
}

Expand Down

0 comments on commit 3d6f060

Please sign in to comment.