Skip to content

Commit 1fd817b

Browse files
committed
address review
1 parent b00a68c commit 1fd817b

4 files changed

Lines changed: 3 additions & 35 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
exclude: ^src/iceberg/catalog/hive/gen-cpp/
3434

3535
- repo: https://github.com/pre-commit/mirrors-clang-format
36-
rev: v22.1.5
36+
rev: v20.1.8
3737
hooks:
3838
- id: clang-format
3939
exclude_types: [json]

‎src/iceberg/manifest/manifest_group.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "iceberg/type.h"
4444
#include "iceberg/util/checked_cast.h"
4545
#include "iceberg/util/content_file_util.h"
46-
#include "iceberg/util/executor_util.h"
46+
#include "iceberg/util/executor_util_internal.h"
4747
#include "iceberg/util/macros.h"
4848

4949
namespace iceberg {

‎src/iceberg/test/executor_util_test.cc‎

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
#include "iceberg/util/executor_util.h"
21-
2220
#include <atomic>
2321
#include <concepts>
2422
#include <functional>
@@ -37,6 +35,7 @@
3735
#include "iceberg/result.h"
3836
#include "iceberg/test/executor.h"
3937
#include "iceberg/test/matchers.h"
38+
#include "iceberg/util/executor_util_internal.h"
4039

4140
namespace iceberg {
4241

@@ -171,37 +170,6 @@ TEST(ParallelCollectTest, CollectsMultipleRanges) {
171170
EXPECT_EQ(executor.submit_count(), 4);
172171
}
173172

174-
namespace {
175-
struct CustomValues {
176-
std::vector<int> values;
177-
};
178-
} // namespace
179-
180-
template <>
181-
struct ParallelReduce<CustomValues> {
182-
using result_type = CustomValues;
183-
184-
template <std::ranges::input_range Values>
185-
static result_type Reduce(Values&& values) {
186-
result_type result;
187-
for (const auto& value : values) {
188-
result.values.insert(result.values.end(), value.values.begin(), value.values.end());
189-
}
190-
return result;
191-
}
192-
};
193-
194-
TEST(ParallelCollectTest, CollectsCustomContainer) {
195-
std::vector<int> input = {1, 2, 3};
196-
197-
auto result = ParallelCollect(std::nullopt, input, [](int value) {
198-
return Result<CustomValues>{CustomValues{{value, value * 10}}};
199-
});
200-
201-
EXPECT_THAT(result, IsOk());
202-
EXPECT_THAT(result->values, ElementsAre(1, 10, 2, 20, 3, 30));
203-
}
204-
205173
TEST(ParallelCollectTest, PropagatesTaskErrors) {
206174
std::vector<int> input = {1, 2, 3};
207175
std::atomic<int> calls = 0;

0 commit comments

Comments
 (0)