Skip to content

Commit

Permalink
Correctly record the rawInputBytes metric in TableScan
Browse files Browse the repository at this point in the history
  • Loading branch information
JkSelf committed Jan 17, 2024
1 parent e2af9d7 commit f08ab75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions velox/dwio/common/DirectBufferedInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ std::vector<cache::CachePin> DirectCoalescedLoad::loadData(bool isPrefetch) {
}
input_->read(buffers, requests_[0].region.offset, LogType::FILE);
ioStats_->read().increment(size);
ioStats_->incRawBytesRead(size - overread);
ioStats_->incRawOverreadBytes(overread);
if (isPrefetch) {
ioStats_->prefetch().increment(size);
Expand Down
3 changes: 2 additions & 1 deletion velox/exec/tests/TableScanTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ TEST_F(TableScanTest, allColumns) {
auto scanNodeId = plan->id();
auto it = planStats.find(scanNodeId);
ASSERT_TRUE(it != planStats.end());
ASSERT_TRUE(it->second.peakMemoryBytes > 0);
ASSERT_GT(it->second.peakMemoryBytes, 0);
ASSERT_GT(it->second.rawInputBytes, 0);
EXPECT_LT(0, exec::TableScan::ioWaitNanos());
}

Expand Down

0 comments on commit f08ab75

Please sign in to comment.