Skip to content

Commit 6c3149c

Browse files
PingLiuPingLakehouse Engine Bot
authored andcommitted
Revert "feat: Add support for evaluating Iceberg partition transforms (facebookincubator#15440)"
This reverts commit bef78ba. Alchemy-item: (ID = 854) Iceberg staging hub commit 2/14 - ecf692f
1 parent 0ec09f9 commit 6c3149c

File tree

12 files changed

+9
-653
lines changed

12 files changed

+9
-653
lines changed

velox/connectors/hive/HiveConnector.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "velox/connectors/hive/HiveDataSource.h"
2222
#include "velox/connectors/hive/HivePartitionFunction.h"
2323
#include "velox/connectors/hive/iceberg/IcebergDataSink.h"
24-
#include "velox/functions/iceberg/Register.h"
2524

2625
#include <boost/lexical_cast.hpp>
2726
#include <memory>
@@ -43,7 +42,6 @@ HiveConnector::HiveConnector(
4342
: nullptr,
4443
std::make_unique<FileHandleGenerator>(hiveConfig_->config())),
4544
ioExecutor_(ioExecutor) {
46-
iceberg::registerIcebergFunctions();
4745
if (hiveConfig_->isFileHandleCacheEnabled()) {
4846
LOG(INFO) << "Hive connector " << connectorId()
4947
<< " created with maximum of "

velox/connectors/hive/iceberg/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ velox_add_library(
1919
IcebergSplitReader.cpp
2020
PartitionSpec.cpp
2121
PositionalDeleteFileReader.cpp
22-
TransformEvaluator.cpp
23-
TransformExprBuilder.cpp
24-
)
25-
26-
velox_link_libraries(
27-
velox_hive_iceberg_splitreader
28-
velox_connector
29-
velox_functions_iceberg
30-
Folly::folly
3122
)
3223

3324
velox_link_libraries(velox_hive_iceberg_splitreader velox_connector Folly::folly)

velox/connectors/hive/iceberg/PartitionSpec.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "velox/connectors/hive/iceberg/PartitionSpec.h"
1818

19-
#include "velox/functions/iceberg/Register.h"
2019
#include "velox/functions/prestosql/types/TimestampWithTimeZoneType.h"
2120

2221
namespace facebook::velox::connector::hive::iceberg {
@@ -103,14 +102,6 @@ VELOX_DEFINE_ENUM_NAME(TransformType, transformTypeNames);
103102

104103
VELOX_DEFINE_ENUM_NAME(TransformCategory, transformCategoryNames);
105104

106-
void registerIcebergFunctions() {
107-
static std::once_flag registerFlag;
108-
109-
std::call_once(registerFlag, []() {
110-
functions::iceberg::registerFunctions(kIcebergFunctionPrefix);
111-
});
112-
}
113-
114105
void IcebergPartitionSpec::checkCompatibility() const {
115106
folly::F14FastMap<std::string_view, std::vector<TransformType>>
116107
columnTransforms;

velox/connectors/hive/iceberg/PartitionSpec.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,6 @@
2020

2121
namespace facebook::velox::connector::hive::iceberg {
2222

23-
inline constexpr char const* kIcebergFunctionPrefix{"iceberg_"};
24-
25-
inline const std::string kBucketFunction =
26-
std::string(kIcebergFunctionPrefix) + "bucket";
27-
inline const std::string kTruncateFunction =
28-
std::string(kIcebergFunctionPrefix) + "truncate";
29-
inline const std::string kYearFunction =
30-
std::string(kIcebergFunctionPrefix) + "years";
31-
inline const std::string kMonthFunction =
32-
std::string(kIcebergFunctionPrefix) + "months";
33-
inline const std::string kDayFunction =
34-
std::string(kIcebergFunctionPrefix) + "days";
35-
inline const std::string kHourFunction =
36-
std::string(kIcebergFunctionPrefix) + "hours";
37-
38-
/// Registers Iceberg partition transform functions with prefix
39-
/// kIcebergFunctionPrefix.
40-
void registerIcebergFunctions();
41-
4223
/// Partition transform types.
4324
/// Defines how source column values are converted into partition keys.
4425
/// See https://iceberg.apache.org/spec/#partition-transforms.
@@ -132,7 +113,6 @@ struct IcebergPartitionSpec {
132113
case TransformType::kTruncate:
133114
return type;
134115
}
135-
VELOX_UNREACHABLE("Unknown transform type");
136116
}
137117
};
138118

velox/connectors/hive/iceberg/TransformEvaluator.cpp

Lines changed: 0 additions & 47 deletions
This file was deleted.

velox/connectors/hive/iceberg/TransformEvaluator.h

Lines changed: 0 additions & 65 deletions
This file was deleted.

velox/connectors/hive/iceberg/TransformExprBuilder.cpp

Lines changed: 0 additions & 106 deletions
This file was deleted.

velox/connectors/hive/iceberg/TransformExprBuilder.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

velox/connectors/hive/iceberg/tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ if(NOT VELOX_DISABLE_GOOGLETEST)
6363
IcebergTestBase.cpp
6464
Main.cpp
6565
PartitionSpecTest.cpp
66-
TransformTest.cpp
6766
)
6867

6968
add_test(velox_hive_iceberg_insert_test velox_hive_iceberg_insert_test)

0 commit comments

Comments
 (0)