Skip to content

Commit 05df7e7

Browse files
Copilotgithub-actions[bot]
authored andcommitted
style: automated clang-format fixes
1 parent a479711 commit 05df7e7

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

src/storage/heap_table.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,17 @@ common::Value HeapTable::TupleView::get_value(size_t col_index) const {
6262
// accessible logical columns (it may differ from schema->column_count()
6363
// for SELECT * queries where the projected schema is built before the star
6464
// is expanded into concrete column entries).
65-
const size_t logical_count =
66-
(column_mapping && !column_mapping->empty()) ? column_mapping->size()
67-
: schema->column_count();
65+
const size_t logical_count = (column_mapping && !column_mapping->empty())
66+
? column_mapping->size()
67+
: schema->column_count();
6868
if (col_index >= logical_count) return common::Value::make_null();
6969

7070
// Resolve the physical column index through the mapping when present.
7171
// col_index is a logical index into the (possibly projected) schema; the
7272
// serialized payload is always laid out in physical table column order.
73-
const size_t physical_idx =
74-
(column_mapping && col_index < column_mapping->size())
75-
? (*column_mapping)[col_index]
76-
: col_index;
73+
const size_t physical_idx = (column_mapping && col_index < column_mapping->size())
74+
? (*column_mapping)[col_index]
75+
: col_index;
7776

7877
// Walk the serialized payload from the beginning to reach physical_idx.
7978
size_t cursor = 0;
@@ -855,9 +854,8 @@ executor::Tuple HeapTable::TupleView::materialize(std::pmr::memory_resource* mr)
855854
// Use the same logical_count logic as get_value so that SELECT * views
856855
// (which have column_mapping with more entries than schema->column_count())
857856
// are materialized correctly.
858-
const size_t num_cols =
859-
(column_mapping && !column_mapping->empty()) ? column_mapping->size()
860-
: schema->columns().size();
857+
const size_t num_cols = (column_mapping && !column_mapping->empty()) ? column_mapping->size()
858+
: schema->columns().size();
861859

862860
std::pmr::vector<common::Value> values(mr);
863861
values.reserve(num_cols);

tests/cloudSQL_tests.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,7 @@ struct TupleViewTestCtx {
10331033
std::unique_ptr<HeapTable> table;
10341034

10351035
explicit TupleViewTestCtx(const std::string& name)
1036-
: disk("./test_data"),
1037-
sm(config::Config::DEFAULT_BUFFER_POOL_SIZE, disk) {
1036+
: disk("./test_data"), sm(config::Config::DEFAULT_BUFFER_POOL_SIZE, disk) {
10381037
schema.add_column("id", ValueType::TYPE_INT64);
10391038
schema.add_column("tag", ValueType::TYPE_TEXT);
10401039
table = std::make_unique<HeapTable>(name, sm, schema);
@@ -1063,8 +1062,7 @@ TEST(TupleViewTests, BasicScanSelectStar) {
10631062

10641063
auto scan = std::make_unique<SeqScanOperator>(
10651064
std::make_shared<HeapTable>(name, ctx.sm, ctx.schema), nullptr, nullptr);
1066-
auto proj =
1067-
std::make_unique<ProjectOperator>(std::move(scan), std::move(cols));
1065+
auto proj = std::make_unique<ProjectOperator>(std::move(scan), std::move(cols));
10681066

10691067
ASSERT_TRUE(proj->init());
10701068
ASSERT_TRUE(proj->open());

0 commit comments

Comments
 (0)