Skip to content

Commit

Permalink
Move to end
Browse files Browse the repository at this point in the history
  • Loading branch information
acvictor committed Jun 3, 2024
1 parent 24bd93c commit 109fec1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions velox/connectors/hive/HiveConnectorSplit.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@ struct HiveConnectorSplit : public connector::ConnectorSplit {
dwio::common::FileFormat _fileFormat,
uint64_t _start = 0,
uint64_t _length = std::numeric_limits<uint64_t>::max(),
std::optional<FileProperties> _properties = std::nullopt,
const std::unordered_map<std::string, std::optional<std::string>>&
_partitionKeys = {},
std::optional<int32_t> _tableBucketNumber = std::nullopt,
const std::unordered_map<std::string, std::string>& _customSplitInfo = {},
const std::shared_ptr<std::string>& _extraFileInfo = {},
const std::unordered_map<std::string, std::string>& _serdeParameters = {},
int64_t _splitWeight = 0,
const std::unordered_map<std::string, std::string>& _infoColumns = {})
const std::unordered_map<std::string, std::string>& _infoColumns = {},
std::optional<FileProperties> _properties = std::nullopt)
: ConnectorSplit(connectorId, _splitWeight),
filePath(_filePath),
fileFormat(_fileFormat),
start(_start),
length(_length),
properties(_properties),
partitionKeys(_partitionKeys),
tableBucketNumber(_tableBucketNumber),
customSplitInfo(_customSplitInfo),
extraFileInfo(_extraFileInfo),
serdeParameters(_serdeParameters),
infoColumns(_infoColumns) {}
infoColumns(_infoColumns),
properties(_properties) {}

std::string toString() const override {
if (tableBucketNumber.has_value()) {
Expand Down
16 changes: 8 additions & 8 deletions velox/connectors/hive/iceberg/IcebergSplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ HiveIcebergSplit::HiveIcebergSplit(
dwio::common::FileFormat _fileFormat,
uint64_t _start,
uint64_t _length,
std::optional<FileProperties> _properties,
const std::unordered_map<std::string, std::optional<std::string>>&
_partitionKeys,
std::optional<int32_t> _tableBucketNumber,
const std::unordered_map<std::string, std::string>& _customSplitInfo,
const std::shared_ptr<std::string>& _extraFileInfo,
const std::unordered_map<std::string, std::string>& _infoColumns)
const std::unordered_map<std::string, std::string>& _infoColumns,
std::optional<FileProperties> _properties)
: HiveConnectorSplit(
_connectorId,
_filePath,
_fileFormat,
_start,
_length,
_properties,
_partitionKeys,
_tableBucketNumber,
_customSplitInfo,
_extraFileInfo,
{},
0,
_infoColumns) {
_infoColumns,
_properties) {
// TODO: Deserialize _extraFileInfo to get deleteFiles;
}

Expand All @@ -57,27 +57,27 @@ HiveIcebergSplit::HiveIcebergSplit(
dwio::common::FileFormat _fileFormat,
uint64_t _start,
uint64_t _length,
std::optional<FileProperties> _properties,
const std::unordered_map<std::string, std::optional<std::string>>&
_partitionKeys,
std::optional<int32_t> _tableBucketNumber,
const std::unordered_map<std::string, std::string>& _customSplitInfo,
const std::shared_ptr<std::string>& _extraFileInfo,
std::vector<IcebergDeleteFile> _deletes,
const std::unordered_map<std::string, std::string>& _infoColumns)
const std::unordered_map<std::string, std::string>& _infoColumns,
std::optional<FileProperties> _properties)
: HiveConnectorSplit(
_connectorId,
_filePath,
_fileFormat,
_start,
_length,
_properties,
_partitionKeys,
_tableBucketNumber,
_customSplitInfo,
_extraFileInfo,
{},
0,
_infoColumns),
_infoColumns,
_properties),
deleteFiles(_deletes) {}
} // namespace facebook::velox::connector::hive::iceberg
8 changes: 4 additions & 4 deletions velox/connectors/hive/iceberg/IcebergSplit.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ struct HiveIcebergSplit : public connector::hive::HiveConnectorSplit {
dwio::common::FileFormat _fileFormat,
uint64_t _start = 0,
uint64_t _length = std::numeric_limits<uint64_t>::max(),
std::optional<FileProperties> fileProperties = std::nullopt,
const std::unordered_map<std::string, std::optional<std::string>>&
_partitionKeys = {},
std::optional<int32_t> _tableBucketNumber = std::nullopt,
const std::unordered_map<std::string, std::string>& _customSplitInfo = {},
const std::shared_ptr<std::string>& _extraFileInfo = {},
const std::unordered_map<std::string, std::string>& _infoColumns = {});
const std::unordered_map<std::string, std::string>& _infoColumns = {},
std::optional<FileProperties> fileProperties = std::nullopt);

// For tests only
HiveIcebergSplit(
Expand All @@ -47,14 +47,14 @@ struct HiveIcebergSplit : public connector::hive::HiveConnectorSplit {
dwio::common::FileFormat _fileFormat,
uint64_t _start = 0,
uint64_t _length = std::numeric_limits<uint64_t>::max(),
std::optional<FileProperties> fileProperties = std::nullopt,
const std::unordered_map<std::string, std::optional<std::string>>&
_partitionKeys = {},
std::optional<int32_t> _tableBucketNumber = std::nullopt,
const std::unordered_map<std::string, std::string>& _customSplitInfo = {},
const std::shared_ptr<std::string>& _extraFileInfo = {},
std::vector<IcebergDeleteFile> deletes = {},
const std::unordered_map<std::string, std::string>& _infoColumns = {});
const std::unordered_map<std::string, std::string>& _infoColumns = {},
std::optional<FileProperties> fileProperties = std::nullopt);
};

} // namespace facebook::velox::connector::hive::iceberg
4 changes: 2 additions & 2 deletions velox/connectors/hive/iceberg/tests/IcebergReadTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ class HiveIcebergTest : public HiveConnectorTestBase {
fileFomat_,
0,
fileSize,
std::nullopt,
partitionKeys,
std::nullopt,
customSplitInfo,
nullptr,
deleteFiles);
deleteFiles,
std::nullopt);
}

std::vector<RowVectorPtr> makeVectors(int32_t count, int32_t rowsPerVector) {
Expand Down
4 changes: 2 additions & 2 deletions velox/connectors/hive/tests/HiveConnectorUtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ TEST_F(HiveConnectorUtilTest, configureReaderOptions) {
fileFormat,
0UL,
std::numeric_limits<uint64_t>::max(),
std::nullopt,
partitionKeys,
std::nullopt,
customSplitInfo,
nullptr,
serdeParameters);
serdeParameters,
std::nullopt);
};

auto performConfigure = [&]() {
Expand Down
4 changes: 2 additions & 2 deletions velox/exec/tests/utils/HiveConnectorTestBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ class HiveConnectorSplitBuilder {
fileFormat_,
start_,
length_,
std::nullopt,
partitionKeys_,
tableBucketNumber_,
customSplitInfo,
extraFileInfo,
serdeParameters,
splitWeight_,
infoColumns_);
infoColumns_,
std::nullopt);
}

private:
Expand Down

0 comments on commit 109fec1

Please sign in to comment.