Skip to content

Commit d41e567

Browse files
amitkduttafacebook-github-bot
authored andcommitted
Back out "feat: Add support for evaluating Iceberg partition transforms" (facebookincubator#15475)
Summary: Original commit changeset: ae45744c1ae1 Original Phabricator Diff: D86686271 details: prestodb/presto#26584 (comment) Reviewed By: abhash09 Differential Revision: D86821554
1 parent 335df89 commit d41e567

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
@@ -20,15 +20,6 @@ velox_add_library(
2020
IcebergSplitReader.cpp
2121
PartitionSpec.cpp
2222
PositionalDeleteFileReader.cpp
23-
TransformEvaluator.cpp
24-
TransformExprBuilder.cpp
25-
)
26-
27-
velox_link_libraries(
28-
velox_hive_iceberg_splitreader
29-
velox_connector
30-
velox_functions_iceberg
31-
Folly::folly
3223
)
3324

3425
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
@@ -64,7 +64,6 @@ if(NOT VELOX_DISABLE_GOOGLETEST)
6464
IcebergTestBase.cpp
6565
Main.cpp
6666
PartitionSpecTest.cpp
67-
TransformTest.cpp
6867
)
6968

7069
add_test(velox_hive_iceberg_insert_test velox_hive_iceberg_insert_test)

0 commit comments

Comments
 (0)