Skip to content

Commit 88066d7

Browse files
committed
Revert "feat: Add iceberg partition specification (facebookincubator#15423)"
This reverts commit 600524b.
1 parent 112ce8a commit 88066d7

File tree

10 files changed

+32
-581
lines changed

10 files changed

+32
-581
lines changed

velox/connectors/hive/iceberg/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
velox_add_library(
1616
velox_hive_iceberg_splitreader
1717
IcebergDataSink.cpp
18-
IcebergSplit.cpp
1918
IcebergSplitReader.cpp
20-
PartitionSpec.cpp
19+
IcebergSplit.cpp
2120
PositionalDeleteFileReader.cpp
2221
)
2322

velox/connectors/hive/iceberg/IcebergDataSink.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ IcebergInsertTableHandle::IcebergInsertTableHandle(
2323
std::vector<HiveColumnHandlePtr> inputColumns,
2424
LocationHandlePtr locationHandle,
2525
dwio::common::FileFormat tableStorageFormat,
26-
IcebergPartitionSpecPtr partitionSpec,
2726
std::optional<common::CompressionKind> compressionKind,
2827
const std::unordered_map<std::string, std::string>& serdeParameters)
2928
: HiveInsertTableHandle(
@@ -35,8 +34,7 @@ IcebergInsertTableHandle::IcebergInsertTableHandle(
3534
serdeParameters,
3635
nullptr,
3736
false,
38-
std::make_shared<const HiveInsertFileNameGenerator>()),
39-
partitionSpec_(std::move(partitionSpec)) {
37+
std::make_shared<const HiveInsertFileNameGenerator>()) {
4038
VELOX_USER_CHECK(
4139
!inputColumns_.empty(),
4240
"Input columns cannot be empty for Iceberg tables.");
@@ -63,10 +61,6 @@ std::vector<std::string> IcebergDataSink::commitMessage() const {
6361
std::vector<std::string> commitTasks;
6462
commitTasks.reserve(writerInfo_.size());
6563

66-
auto icebergInsertTableHandle =
67-
std::dynamic_pointer_cast<const IcebergInsertTableHandle>(
68-
insertTableHandle_);
69-
7064
for (auto i = 0; i < writerInfo_.size(); ++i) {
7165
const auto& info = writerInfo_.at(i);
7266
VELOX_CHECK_NOT_NULL(info);
@@ -81,7 +75,7 @@ std::vector<std::string> IcebergDataSink::commitMessage() const {
8175
("fileSizeInBytes", ioStats_.at(i)->rawBytesWritten())
8276
("metrics",
8377
folly::dynamic::object("recordCount", info->numWrittenRows))
84-
("partitionSpecJson", icebergInsertTableHandle->partitionSpec()->specId)
78+
("partitionSpecJson", 0)
8579
("fileFormat", "PARQUET")
8680
("content", "DATA");
8781
// clang-format on

velox/connectors/hive/iceberg/IcebergDataSink.h

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#pragma once
1818

1919
#include "velox/connectors/hive/HiveDataSink.h"
20-
#include "velox/connectors/hive/iceberg/PartitionSpec.h"
2120

2221
namespace facebook::velox::connector::hive::iceberg {
2322

@@ -33,45 +32,15 @@ class IcebergInsertTableHandle final : public HiveInsertTableHandle {
3332
/// @param locationHandle Contains the target location information including:
3433
/// - Base directory path where data files will be written.
3534
/// - File naming scheme and temporary directory paths.
36-
/// @param tableStorageFormat File format to use for writing data files.
37-
/// @param partitionSpec Optional partition specification defining how to
38-
/// partition the data. If nullptr, the table is unpartitioned and all data
39-
/// is written to a single directory.
4035
/// @param compressionKind Optional compression to apply to data files.
4136
/// @param serdeParameters Additional serialization/deserialization parameters
4237
/// for the file format.
4338
IcebergInsertTableHandle(
4439
std::vector<HiveColumnHandlePtr> inputColumns,
4540
LocationHandlePtr locationHandle,
4641
dwio::common::FileFormat tableStorageFormat,
47-
IcebergPartitionSpecPtr partitionSpec,
4842
std::optional<common::CompressionKind> compressionKind = {},
4943
const std::unordered_map<std::string, std::string>& serdeParameters = {});
50-
51-
#ifdef VELOX_ENABLE_BACKWARD_COMPATIBILITY
52-
IcebergInsertTableHandle(
53-
std::vector<HiveColumnHandlePtr> inputColumns,
54-
LocationHandlePtr locationHandle,
55-
dwio::common::FileFormat tableStorageFormat,
56-
std::optional<common::CompressionKind> compressionKind = {},
57-
const std::unordered_map<std::string, std::string>& serdeParameters = {})
58-
: IcebergInsertTableHandle(
59-
inputColumns,
60-
locationHandle,
61-
tableStorageFormat,
62-
nullptr,
63-
compressionKind,
64-
serdeParameters) {}
65-
#endif
66-
67-
/// Returns the Iceberg partition specification that defines how the table
68-
/// is partitioned.
69-
const IcebergPartitionSpecPtr& partitionSpec() const {
70-
return partitionSpec_;
71-
}
72-
73-
private:
74-
const IcebergPartitionSpecPtr partitionSpec_;
7544
};
7645

7746
using IcebergInsertTableHandlePtr =

velox/connectors/hive/iceberg/PartitionSpec.cpp

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

0 commit comments

Comments
 (0)