Skip to content

Commit bbd44a6

Browse files
committed
format
1 parent 85945ee commit bbd44a6

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

be/test/core/column/column_array_view_test.cpp

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,15 @@ static ColumnPtr build_int32_array_column(const std::vector<std::vector<int32_t>
6666
for (auto v : row_nulls) {
6767
outer_null->insert_value(v);
6868
}
69-
array_col = ColumnNullable::create(array_col->assume_mutable(),
70-
std::move(outer_null));
69+
array_col = ColumnNullable::create(array_col->assume_mutable(), std::move(outer_null));
7170
}
7271
return array_col;
7372
}
7473

7574
// Helper: build a ColumnArray with Nullable(ColumnString) nested data.
76-
static ColumnPtr build_string_array_column(
77-
const std::vector<std::vector<std::string>>& arrays,
78-
const std::vector<uint8_t>& element_nulls,
79-
const std::vector<uint8_t>& row_nulls = {}) {
75+
static ColumnPtr build_string_array_column(const std::vector<std::vector<std::string>>& arrays,
76+
const std::vector<uint8_t>& element_nulls,
77+
const std::vector<uint8_t>& row_nulls = {}) {
8078
auto data_col = ColumnString::create();
8179
auto null_col = ColumnUInt8::create();
8280
size_t flat_idx = 0;
@@ -103,8 +101,7 @@ static ColumnPtr build_string_array_column(
103101
for (auto v : row_nulls) {
104102
outer_null->insert_value(v);
105103
}
106-
array_col = ColumnNullable::create(array_col->assume_mutable(),
107-
std::move(outer_null));
104+
array_col = ColumnNullable::create(array_col->assume_mutable(), std::move(outer_null));
108105
}
109106
return array_col;
110107
}
@@ -114,8 +111,7 @@ static ColumnPtr build_string_array_column(
114111
// Test basic non-nullable, non-const array column
115112
// Row 0: [10, 20, 30], Row 1: [40], Row 2: [50, 60]
116113
TEST(ColumnArrayViewTest, IndexAccess_basic) {
117-
auto col = build_int32_array_column({{10, 20, 30}, {40}, {50, 60}},
118-
{0, 0, 0, 0, 0, 0});
114+
auto col = build_int32_array_column({{10, 20, 30}, {40}, {50, 60}}, {0, 0, 0, 0, 0, 0});
119115
auto view = ColumnArrayView<TYPE_INT>::create(col);
120116

121117
EXPECT_EQ(view.size(), 3);
@@ -147,8 +143,7 @@ TEST(ColumnArrayViewTest, IndexAccess_basic) {
147143
// Test with null elements inside arrays
148144
// Row 0: [1, NULL, 3], Row 1: [NULL]
149145
TEST(ColumnArrayViewTest, IndexAccess_with_null_elements) {
150-
auto col = build_int32_array_column({{1, 0, 3}, {0}},
151-
{0, 1, 0, 1});
146+
auto col = build_int32_array_column({{1, 0, 3}, {0}}, {0, 1, 0, 1});
152147
auto view = ColumnArrayView<TYPE_INT>::create(col);
153148

154149
EXPECT_EQ(view.size(), 2);
@@ -169,9 +164,7 @@ TEST(ColumnArrayViewTest, IndexAccess_with_null_elements) {
169164
// Test with outer nullable (some rows are entirely null)
170165
// Row 0: [1, 2], Row 1: NULL, Row 2: [5]
171166
TEST(ColumnArrayViewTest, IndexAccess_outer_nullable) {
172-
auto col = build_int32_array_column({{1, 2}, {0}, {5}},
173-
{0, 0, 0, 0},
174-
{0, 1, 0});
167+
auto col = build_int32_array_column({{1, 2}, {0}, {5}}, {0, 0, 0, 0}, {0, 1, 0});
175168
auto view = ColumnArrayView<TYPE_INT>::create(col);
176169

177170
EXPECT_EQ(view.size(), 3);

0 commit comments

Comments
 (0)