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
2 changes: 1 addition & 1 deletion .github/workflows/prestocpp-linux-adapters-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
prestocpp-linux-adapters-build:
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
concurrency:
group: ${{ github.workflow }}-prestocpp-linux-adapters-build-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/prestocpp-linux-build-and-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-22.04
needs: changes
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
concurrency:
group: ${{ github.workflow }}-prestocpp-linux-build-test-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down Expand Up @@ -79,8 +79,6 @@ jobs:
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
run: |
source /opt/rh/gcc-toolset-12/enable
cp -r presto-native-tests/presto_cpp/tests presto-native-execution/presto_cpp/main/functions/dynamic_registry
echo "add_subdirectory(tests)" >> presto-native-execution/presto_cpp/main/functions/dynamic_registry/CMakeLists.txt
cd presto-native-execution
cmake \
-B _build/release \
Expand Down Expand Up @@ -128,13 +126,12 @@ jobs:
path: |
presto-native-execution/_build/release/presto_cpp/main/presto_server
presto-native-execution/_build/release/velox/velox/functions/remote/server/velox_functions_remote_server_main
presto-native-execution/_build/release/presto_cpp/main/functions/dynamic_registry/tests/

prestocpp-linux-presto-e2e-tests:
needs: [changes, prestocpp-linux-build-for-test]
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
env:
MAVEN_OPTS: "-Xmx4G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true"
Expand Down Expand Up @@ -230,7 +227,7 @@ jobs:
storage-format: [ "PARQUET", "DWRF" ]
enable-sidecar: [ "true", "false" ]
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
env:
MAVEN_OPTS: "-Xmx4G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true"
Expand All @@ -255,6 +252,13 @@ jobs:
name: presto-native-build
path: presto-native-execution/_build/release

- name: Update velox
if: |
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
run: |
cd presto-native-execution
make velox-submodule

# Permissions are lost when uploading. Details here: https://github.com/actions/upload-artifact/issues/38
- name: Restore execute permissions and library path
if: |
Expand Down Expand Up @@ -324,7 +328,7 @@ jobs:
storage-format: [ "PARQUET", "DWRF" ]
enable-sidecar: [ "true", "false" ]
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
env:
MAVEN_OPTS: "-Xmx4G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true"
Expand Down Expand Up @@ -413,7 +417,7 @@ jobs:
needs: [changes, prestocpp-linux-build-for-test]
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
env:
MAVEN_OPTS: "-Xmx4G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true"
Expand Down Expand Up @@ -498,7 +502,7 @@ jobs:
needs: [changes, prestocpp-linux-build-for-test]
runs-on: ubuntu-22.04
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
env:
MAVEN_OPTS: "-Xmx4G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prestocpp-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-22.04
needs: changes
container:
image: prestodb/presto-native-dependency:0.293-20250522140509-484b00e
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
volumes:
- /usr:/host_usr
- /opt:/host_opt
Expand Down
2 changes: 1 addition & 1 deletion presto-native-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.10)
# set the project name
project(PrestoCpp)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ set(PRESTO_AND_VELOX_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/../presto-native-execution/velox
)

add_library(presto_cpp_custom_functions_test SHARED CustomFunctions.cpp)

find_package(xsimd)
set(CMAKE_DYLIB_TEST_LINK_LIBRARIES fmt::fmt
xsimd)

if(APPLE)
message(STATUS "APPLE compilation requires gflags library. Appending.")
list(APPEND CMAKE_DYLIB_TEST_LINK_LIBRARIES "gflags::gflags")
endif()

add_library(presto_cpp_custom_functions_test SHARED CustomFunctions.cpp)

target_include_directories(presto_cpp_custom_functions_test
PRIVATE
${PRESTO_AND_VELOX_INCLUDE_DIRS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class NativeTestsUtils
{
private NativeTestsUtils() {}

public static QueryRunner createNativeQueryRunner(String storageFormat, boolean charNToVarcharImplicitCast, boolean sidecarEnabled)
public static QueryRunner createNativeQueryRunner(String storageFormat, boolean charNToVarcharImplicitCast, boolean sidecarEnabled, boolean customFunctionsEnabled)
throws Exception
{
QueryRunner queryRunner = nativeHiveQueryRunnerBuilder()
Expand All @@ -40,14 +40,20 @@ public static QueryRunner createNativeQueryRunner(String storageFormat, boolean
.setUseThrift(true)
.setImplicitCastCharNToVarchar(charNToVarcharImplicitCast)
.setCoordinatorSidecarEnabled(sidecarEnabled)
.setPluginDirectory(sidecarEnabled ? Optional.of(getCustomFunctionsPluginDirectory().toString()) : Optional.empty())
.setPluginDirectory(customFunctionsEnabled ? Optional.of(getCustomFunctionsPluginDirectory().toString()) : Optional.empty())
.build();
if (sidecarEnabled) {
setupNativeSidecarPlugin(queryRunner);
}
return queryRunner;
}

public static QueryRunner createNativeQueryRunner(String storageFormat, boolean charNToVarcharImplicitCast, boolean sidecarEnabled)
throws Exception
{
return createNativeQueryRunner(storageFormat, false, sidecarEnabled, false);
}

public static QueryRunner createNativeQueryRunner(String storageFormat, boolean sidecarEnabled)
throws Exception
{
Expand Down Expand Up @@ -89,9 +95,7 @@ public static Path getCustomFunctionsPluginDirectory()
// All candidate paths relative to prestoRoot
List<Path> candidates = ImmutableList.of(
prestoRoot.resolve("presto-native-tests/_build/debug/presto_cpp/tests/custom_functions"),
prestoRoot.resolve("presto-native-tests/_build/release/presto_cpp/tests/custom_functions"),
prestoRoot.resolve("presto-native-execution/_build/debug/presto_cpp/main/functions/dynamic_registry/tests/custom_functions"),
prestoRoot.resolve("presto-native-execution/_build/release/presto_cpp/main/functions/dynamic_registry/tests/custom_functions"));
prestoRoot.resolve("presto-native-tests/_build/release/presto_cpp/tests/custom_functions"));

return candidates.stream()
.filter(Files::exists)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void init()
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return NativeTestsUtils.createNativeQueryRunner(storageFormat, sidecarEnabled);
return NativeTestsUtils.createNativeQueryRunner(storageFormat, false, sidecarEnabled, true);
}

@Override
Expand Down
Loading