Skip to content

Commit 5b0d932

Browse files
committed
add docstring and LICENSE/NOTICE notes
Signed-off-by: Junwang Zhao <[email protected]>
1 parent 60817bc commit 5b0d932

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,17 @@ https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
267267

268268
MurmurHash3 was written by Austin Appleby, and is placed in the public
269269
domain. The author disclaims copyright to this source code.
270+
271+
--------------------------------------------------------------------------------
272+
273+
The file src/iceberg/util/checked_cast.h contains code adapted from
274+
275+
https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/checked_cast.h
276+
277+
The file src/iceberg/util/visit_type.h contains code adapted from
278+
279+
https://github.com/apache/arrow/blob/main/cpp/src/arrow/visit_type_inline.h
280+
281+
Copyright: 2016-2025 The Apache Software Foundation.
282+
Home page: https://arrow.apache.org/
283+
License: https://www.apache.org/licenses/LICENSE-2.0

NOTICE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ This product includes code from smhasher
1212
* MurmurHash3 was written by Austin Appleby, and is placed in the public
1313
* domain. The author hereby disclaims copyright to this source code.
1414
* https://github.com/aappleby/smhasher
15+
16+
This product includes code from Apache Arrow
17+
* Copyright 2016-2025 The Apache Software Foundation
18+
* https://github.com/apache/arrow

src/iceberg/util/checked_cast.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919

2020
#pragma once
2121

22+
/// \file iceberg/util/checked_cast.h
23+
/// \brief Checked cast functions for dynamic_cast and static_cast.
24+
/// Adapted from Apache Arrow
25+
/// https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/checked_cast.h
26+
2227
#include <memory>
2328
#include <type_traits>
2429
#include <utility>

src/iceberg/util/visit_type.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919

2020
#pragma once
2121

22+
/// \file iceberg/util/visit_type.h
23+
/// \brief Visitor pattern for Iceberg types
24+
/// Adapted from Apache Arrow
25+
/// https://github.com/apache/arrow/blob/main/cpp/src/arrow/visit_type_inline.h
26+
2227
#include "iceberg/result.h"
2328
#include "iceberg/type.h"
2429
#include "iceberg/util/checked_cast.h"
2530
#include "iceberg/util/unreachable.h"
2631
#include "iceberg/util/visitor_generate.h"
2732

28-
// Adapted from Apache Arrow
29-
// https://github.com/apache/arrow/blob/main/cpp/src/arrow/visit_type_inline.h
30-
3133
namespace iceberg {
3234

3335
#define TYPE_VISIT_INLINE(TYPE_CLASS) \

test/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ target_link_libraries(json_serde_test PRIVATE iceberg_static GTest::gtest_main
5858
add_test(NAME json_serde_test COMMAND json_serde_test)
5959

6060
add_executable(util_test)
61-
target_sources(util_test PRIVATE expected_test.cc formatter_test.cc config_test.cc visit_type_test.cc)
61+
target_sources(util_test PRIVATE expected_test.cc formatter_test.cc config_test.cc
62+
visit_type_test.cc)
6263
target_link_libraries(util_test PRIVATE iceberg_static GTest::gtest_main GTest::gmock)
6364
add_test(NAME util_test COMMAND util_test)
6465

0 commit comments

Comments
 (0)