Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
HivePrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const {
const TypeParser& typeParser) const {
auto hiveLayout =
std::dynamic_pointer_cast<const protocol::hive::HiveTableLayoutHandle>(
tableHandle.connectorTableLayout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class HivePrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<velox::connector::ConnectorInsertTableHandle>
toVeloxInsertTableHandle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
IcebergPrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const {
const TypeParser& typeParser) const {
auto icebergLayout = std::dynamic_pointer_cast<
const protocol::iceberg::IcebergTableLayoutHandle>(
tableHandle.connectorTableLayout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class IcebergPrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<protocol::ConnectorProtocol> createConnectorProtocol()
const final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
TpchPrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const {
const TypeParser& typeParser) const {
auto tpchLayout =
std::dynamic_pointer_cast<const protocol::tpch::TpchTableLayoutHandle>(
tableHandle.connectorTableLayout);
Expand Down Expand Up @@ -153,8 +152,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
TpcdsPrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const {
const TypeParser& typeParser) const {
auto tpcdsLayout =
std::dynamic_pointer_cast<const protocol::tpcds::TpcdsTableLayoutHandle>(
tableHandle.connectorTableLayout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class PrestoToVeloxConnector {
toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const = 0;
const TypeParser& typeParser) const = 0;

[[nodiscard]] virtual std::unique_ptr<
velox::connector::ConnectorInsertTableHandle>
Expand Down Expand Up @@ -132,8 +131,7 @@ class TpchPrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<protocol::ConnectorProtocol> createConnectorProtocol()
const final;
Expand All @@ -156,8 +154,7 @@ class TpcdsPrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<protocol::ConnectorProtocol> createConnectorProtocol()
const final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
SystemPrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const {
const TypeParser& typeParser) const {
auto systemLayout =
std::dynamic_pointer_cast<const protocol::SystemTableLayoutHandle>(
tableHandle.connectorTableLayout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ class SystemPrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<protocol::ConnectorProtocol> createConnectorProtocol()
const final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ std::unique_ptr<velox::connector::ConnectorTableHandle>
ArrowPrestoToVeloxConnector::toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& /*exprConverter*/,
const TypeParser& /*typeParser*/,
const velox::connector::ColumnHandleMap& /*assignments*/) const {
const TypeParser& /*typeParser*/) const {
return std::make_unique<presto::ArrowFlightTableHandle>(
tableHandle.connectorId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class ArrowPrestoToVeloxConnector final : public PrestoToVeloxConnector {
std::unique_ptr<velox::connector::ConnectorTableHandle> toVeloxTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
const velox::connector::ColumnHandleMap& assignments) const final;
const TypeParser& typeParser) const final;

std::unique_ptr<protocol::ConnectorProtocol> createConnectorProtocol()
const final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ std::shared_ptr<connector::ColumnHandle> toColumnHandle(
std::shared_ptr<connector::ConnectorTableHandle> toConnectorTableHandle(
const protocol::TableHandle& tableHandle,
const VeloxExprConverter& exprConverter,
const TypeParser& typeParser,
connector::ColumnHandleMap& assignments) {
const TypeParser& typeParser) {
const auto& connector =
getPrestoToVeloxConnector(tableHandle.connectorHandle->_type);
return connector.toVeloxTableHandle(
tableHandle, exprConverter, typeParser, assignments);
return connector.toVeloxTableHandle(tableHandle, exprConverter, typeParser);
}

std::vector<core::TypedExprPtr> getProjections(
Expand Down Expand Up @@ -1007,8 +1005,8 @@ VeloxQueryPlanConverterBase::toVeloxQueryPlan(
assignments.emplace(
variable.name, toColumnHandle(columnHandle.get(), typeParser_));
}
auto connectorTableHandle = toConnectorTableHandle(
node->table, exprConverter_, typeParser_, assignments);
auto connectorTableHandle =
toConnectorTableHandle(node->table, exprConverter_, typeParser_);
return std::make_shared<core::TableScanNode>(
node->id, rowType, connectorTableHandle, assignments);
}
Expand Down Expand Up @@ -1376,8 +1374,8 @@ VeloxQueryPlanConverterBase::toVeloxQueryPlan(
assignments.emplace(
variable.name, toColumnHandle(columnHandle.get(), typeParser_));
}
auto connectorTableHandle = toConnectorTableHandle(
node->tableHandle, exprConverter_, typeParser_, assignments);
auto connectorTableHandle =
toConnectorTableHandle(node->tableHandle, exprConverter_, typeParser_);
return std::make_shared<core::TableScanNode>(
node->id, rowType, connectorTableHandle, assignments);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ TEST_F(PrestoToVeloxConnectorTest, icebergPreservesColumnNameCase) {
tableHandle.connectorTableLayout = layout;

IcebergPrestoToVeloxConnector icebergConnector("iceberg");
connector::ColumnHandleMap assignments;
auto result = icebergConnector.toVeloxTableHandle(
tableHandle, *exprConverter_, *typeParser_, assignments);
tableHandle, *exprConverter_, *typeParser_);

ASSERT_NE(result, nullptr);
auto* handle = dynamic_cast<connector::hive::HiveTableHandle*>(result.get());
Expand Down Expand Up @@ -172,9 +171,8 @@ TEST_F(PrestoToVeloxConnectorTest, hiveLowercasesColumnNames) {
tableHandle.connectorTableLayout = layout;

HivePrestoToVeloxConnector hiveConnector("hive");
connector::ColumnHandleMap assignments;
auto result = hiveConnector.toVeloxTableHandle(
tableHandle, *exprConverter_, *typeParser_, assignments);
tableHandle, *exprConverter_, *typeParser_);

ASSERT_NE(result, nullptr);
auto* handle = dynamic_cast<connector::hive::HiveTableHandle*>(result.get());
Expand Down
Loading