Skip to content

Commit

Permalink
[native] Register Velox hive connector factory for iceberg
Browse files Browse the repository at this point in the history
The current iceberg catalog uses "hive" for the connector.name.
Register a Velox hive connector factory for iceberg with name `iceberg`.
"connector.name=iceberg" is now supported.
  • Loading branch information
majetideepak authored and aditi-pandit committed May 10, 2024
1 parent 34ea555 commit bd3ff3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions presto-native-execution/etc/catalog/iceberg.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# The Presto "iceberg" catalog is handled by the hive connector in Presto native execution.
connector.name=hive
connector.name=iceberg
6 changes: 6 additions & 0 deletions presto-native-execution/presto_cpp/main/PrestoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "velox/common/memory/MmapAllocator.h"
#include "velox/common/memory/SharedArbitrator.h"
#include "velox/connectors/Connector.h"
#include "velox/connectors/hive/HiveConnector.h"
#include "velox/core/Config.h"
#include "velox/exec/OutputBufferManager.h"
#include "velox/functions/prestosql/aggregates/RegisterAggregateFunctions.h"
Expand Down Expand Up @@ -224,6 +225,11 @@ void PrestoServer::run() {
registerShuffleInterfaceFactories();
registerCustomOperators();

// Register Velox connector factory for iceberg.
// The iceberg catalog is handled by the hive connector factory.
connector::registerConnectorFactory(
std::make_shared<connector::hive::HiveConnectorFactory>("iceberg"));

registerPrestoToVeloxConnector(
std::make_unique<HivePrestoToVeloxConnector>("hive"));
registerPrestoToVeloxConnector(
Expand Down

0 comments on commit bd3ff3b

Please sign in to comment.