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
3 changes: 2 additions & 1 deletion .github/workflows/prestocpp-linux-build-and-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ jobs:
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
run: |
export PRESTO_SERVER_PATH="${GITHUB_WORKSPACE}/presto-native-execution/_build/release/presto_cpp/main/presto_server"
export TESTFILES=`find ./presto-native-execution/src/test -type f -name 'TestPrestoNative*.java'`
# Find TestPrestoNative*.java files and iceberg test files
export TESTFILES=$(find ./presto-native-execution/src/test -type f -name 'TestPrestoNative*.java'; find ./presto-native-execution/src/test/java/com/facebook/presto/nativeworker/iceberg -type f -name '*.java')
# Convert file paths to comma separated class names
export TESTCLASSES=
for test_file in $TESTFILES
Expand Down
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 @@ -289,7 +289,7 @@ public QueryRunner build()
{
Optional<BiFunction<Integer, URI, Process>> externalWorkerLauncher = Optional.empty();
if (this.useExternalWorkerLauncher) {
externalWorkerLauncher = getExternalWorkerLauncher("hive", serverBinary, cacheMaxSize, remoteFunctionServerUds,
externalWorkerLauncher = getExternalWorkerLauncher("hive", "hive", serverBinary, cacheMaxSize, remoteFunctionServerUds,
pluginDirectory, failOnNestedLoopJoin, coordinatorSidecarEnabled, builtInWorkerFunctionsEnabled, enableRuntimeMetricsCollection, enableSsdCache, implicitCastCharNToVarchar);
}
return HiveQueryRunner.createQueryRunner(
Expand Down Expand Up @@ -382,7 +382,7 @@ public QueryRunner build()
{
Optional<BiFunction<Integer, URI, Process>> externalWorkerLauncher = Optional.empty();
if (this.useExternalWorkerLauncher) {
externalWorkerLauncher = getExternalWorkerLauncher("iceberg", serverBinary, cacheMaxSize, remoteFunctionServerUds,
externalWorkerLauncher = getExternalWorkerLauncher("iceberg", "iceberg", serverBinary, cacheMaxSize, remoteFunctionServerUds,
Optional.empty(), false, false, false, false, false, false);
}
return IcebergQueryRunner.builder()
Expand Down Expand Up @@ -481,6 +481,7 @@ public static NativeQueryRunnerParameters getNativeQueryRunnerParameters()

public static Optional<BiFunction<Integer, URI, Process>> getExternalWorkerLauncher(
String catalogName,
String connectorName,
String prestoServerPath,
int cacheMaxSize,
Optional<String> remoteFunctionServerUds,
Expand Down Expand Up @@ -562,19 +563,19 @@ else if (isBuiltInWorkerFunctionsEnabled) {
Files.createDirectory(catalogDirectoryPath);
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