File tree Expand file tree Collapse file tree 3 files changed +35
-38
lines changed Expand file tree Collapse file tree 3 files changed +35
-38
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ function(add_iceberg_lib LIB_NAME)
131131 endif ()
132132
133133 if (LIB_INCLUDES)
134- target_include_directories (${LIB_NAME} _shared SYSTEM PUBLIC ${ARG_EXTRA_INCLUDES} )
134+ target_include_directories (${LIB_NAME} _shared PUBLIC ${ARG_EXTRA_INCLUDES} )
135135 endif ()
136136
137137 if (ARG_PRIVATE_INCLUDES)
@@ -179,7 +179,7 @@ function(add_iceberg_lib LIB_NAME)
179179 endif ()
180180
181181 if (LIB_INCLUDES)
182- target_include_directories (${LIB_NAME} _static SYSTEM PUBLIC ${ARG_EXTRA_INCLUDES} )
182+ target_include_directories (${LIB_NAME} _static PUBLIC ${ARG_EXTRA_INCLUDES} )
183183 endif ()
184184
185185 if (ARG_PRIVATE_INCLUDES)
Original file line number Diff line number Diff line change 2727#include " iceberg/type.h"
2828
2929namespace iceberg {
30- namespace {
31- constexpr std::string_view kUnknownName = " unknown" ;
32- constexpr std::string_view kIdentityName = " identity" ;
33- constexpr std::string_view kBucketName = " bucket" ;
34- constexpr std::string_view kTruncateName = " truncate" ;
35- constexpr std::string_view kYearName = " year" ;
36- constexpr std::string_view kMonthName = " month" ;
37- constexpr std::string_view kDayName = " day" ;
38- constexpr std::string_view kHourName = " hour" ;
39- constexpr std::string_view kVoidName = " void" ;
40- } // namespace
41-
42- constexpr std::string_view TransformTypeToString (TransformType type) {
43- switch (type) {
44- case TransformType::kUnknown :
45- return kUnknownName ;
46- case TransformType::kIdentity :
47- return kIdentityName ;
48- case TransformType::kBucket :
49- return kBucketName ;
50- case TransformType::kTruncate :
51- return kTruncateName ;
52- case TransformType::kYear :
53- return kYearName ;
54- case TransformType::kMonth :
55- return kMonthName ;
56- case TransformType::kDay :
57- return kDayName ;
58- case TransformType::kHour :
59- return kHourName ;
60- case TransformType::kVoid :
61- return kVoidName ;
62- }
63- std::unreachable ();
64- }
6530
6631std::shared_ptr<Transform> Transform::Identity () {
6732 static auto instance =
Original file line number Diff line number Diff line change @@ -56,8 +56,40 @@ enum class TransformType {
5656 kVoid ,
5757};
5858
59+ constexpr std::string_view kUnknownName = " unknown" ;
60+ constexpr std::string_view kIdentityName = " identity" ;
61+ constexpr std::string_view kBucketName = " bucket" ;
62+ constexpr std::string_view kTruncateName = " truncate" ;
63+ constexpr std::string_view kYearName = " year" ;
64+ constexpr std::string_view kMonthName = " month" ;
65+ constexpr std::string_view kDayName = " day" ;
66+ constexpr std::string_view kHourName = " hour" ;
67+ constexpr std::string_view kVoidName = " void" ;
68+
5969// / \brief Get the relative transform name
60- ICEBERG_EXPORT constexpr std::string_view TransformTypeToString (TransformType type);
70+ ICEBERG_EXPORT constexpr std::string_view TransformTypeToString (TransformType type) {
71+ switch (type) {
72+ case TransformType::kUnknown :
73+ return kUnknownName ;
74+ case TransformType::kIdentity :
75+ return kIdentityName ;
76+ case TransformType::kBucket :
77+ return kBucketName ;
78+ case TransformType::kTruncate :
79+ return kTruncateName ;
80+ case TransformType::kYear :
81+ return kYearName ;
82+ case TransformType::kMonth :
83+ return kMonthName ;
84+ case TransformType::kDay :
85+ return kDayName ;
86+ case TransformType::kHour :
87+ return kHourName ;
88+ case TransformType::kVoid :
89+ return kVoidName ;
90+ }
91+ std::unreachable ();
92+ }
6193
6294// / \brief Represents a transform used in partitioning or sorting in Iceberg.
6395// /
You can’t perform that action at this time.
0 commit comments