Skip to content

UnitTest SegmentReadTaskTest.InitInputStream does not meet expectations #9866

@JinheLin

Description

@JinheLin

task->initInputStream(column_defines, 0, nullptr, ReadMode::Bitmap, DEFAULT_BLOCK_SIZE, true);
auto stream = task->getInputStream();
ASSERT_NE(stream, nullptr);
std::vector<Block> blks;
for (auto blk = stream->read(); blk; blk = stream->read())
{
blks.push_back(blk);
}
auto handle_col1 = vstackBlocks(std::move(blks)).getByName(MutSup::extra_handle_column_name).column;
auto handle_col2 = getSegmentHandle(task->segment->segmentId(), {task->segment->getRowKeyRange()});
ASSERT_TRUE(sequenceEqual(
toColumnVectorDataPtr<Int64>(handle_col2)->data(),
toColumnVectorDataPtr<Int64>(handle_col1)->data(),
handle_col1->size()));

  • In L124, used 0 as the parameter for start_ts, resulting in an empty read result.
  • In L134~L137, sequenceEqual not checking the size of the two sequences. Since handle_col1->size() is 0, this is equivalent to skipping the check of two sequences.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions