diff --git a/.github/workflows/prestocpp-linux-build-and-unit-test.yml b/.github/workflows/prestocpp-linux-build-and-unit-test.yml index 88e6ebafb6b74..a4b5db6ce88fd 100644 --- a/.github/workflows/prestocpp-linux-build-and-unit-test.yml +++ b/.github/workflows/prestocpp-linux-build-and-unit-test.yml @@ -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 diff --git a/presto-native-execution/presto_cpp/main/connectors/Registration.cpp b/presto-native-execution/presto_cpp/main/connectors/Registration.cpp index 52cfd06f2a15d..c70b45db839a2 100644 --- a/presto-native-execution/presto_cpp/main/connectors/Registration.cpp +++ b/presto-native-execution/presto_cpp/main/connectors/Registration.cpp @@ -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 @@ -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( - kIcebergConnectorName)); + std::make_shared()); #ifdef PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR // Note: ArrowFlightConnectorFactory would need to be implemented in Presto diff --git a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java index a7a715f533883..3ffc18deed0ca 100644 --- a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java +++ b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java @@ -289,7 +289,7 @@ public QueryRunner build() { Optional> 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( @@ -382,7 +382,7 @@ public QueryRunner build() { Optional> 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() @@ -481,6 +481,7 @@ public static NativeQueryRunnerParameters getNativeQueryRunnerParameters() public static Optional> getExternalWorkerLauncher( String catalogName, + String connectorName, String prestoServerPath, int cacheMaxSize, Optional remoteFunctionServerUds, @@ -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"),