Skip to content
Draft
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 @@ -22,6 +22,7 @@
#endif

#include "velox/connectors/hive/HiveConnector.h"
#include "velox/connectors/hive/iceberg/IcebergConnector.h"
#include "velox/connectors/tpcds/TpcdsConnector.h"
#include "velox/connectors/tpch/TpchConnector.h"
#ifdef PRESTO_ENABLE_CUDF
Expand Down Expand Up @@ -124,10 +125,9 @@ void registerConnectorFactories() {
std::make_shared<
facebook::velox::connector::tpch::TpchConnectorFactory>());

// Register Iceberg connector factory (using Hive implementation)
facebook::presto::registerConnectorFactory(
std::make_shared<facebook::velox::connector::hive::HiveConnectorFactory>(
kIcebergConnectorName));
std::make_shared<facebook::velox::connector::hive::iceberg::
IcebergConnectorFactory>());

#ifdef PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR
// Note: ArrowFlightConnectorFactory would need to be implemented in Presto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,21 +560,22 @@ else if (isBuiltInWorkerFunctionsEnabled) {

Path catalogDirectoryPath = tempDirectoryPath.resolve("catalog");
Files.createDirectory(catalogDirectoryPath);
String connectorName = catalogName.equals("iceberg") ? "iceberg" : "hive";
if (cacheMaxSize > 0) {
Files.write(catalogDirectoryPath.resolve(format("%s.properties", catalogName)),
format("connector.name=hive%n" +
format("connector.name=%s%n" +
"cache.enabled=true%n" +
"cache.max-cache-size=%s", cacheMaxSize).getBytes());
"cache.max-cache-size=%s", connectorName, cacheMaxSize).getBytes());
}
else {
Files.write(catalogDirectoryPath.resolve(format("%s.properties", catalogName)),
"connector.name=hive".getBytes());
format("connector.name=%s", connectorName).getBytes());
}
// Add catalog with caching always enabled.
Files.write(catalogDirectoryPath.resolve(format("%scached.properties", catalogName)),
format("connector.name=hive%n" +
format("connector.name=%s%n" +
"cache.enabled=true%n" +
"cache.max-cache-size=32").getBytes());
"cache.max-cache-size=32", connectorName).getBytes());

// Add a tpch catalog.
Files.write(catalogDirectoryPath.resolve("tpchstandard.properties"),
Expand Down
Loading