Skip to content

Comments

fix: Use namespaced GTest targets in arrow_flight tests#27137

Open
jkhaliqi wants to merge 1 commit intoprestodb:masterfrom
jkhaliqi:fix_gtest
Open

fix: Use namespaced GTest targets in arrow_flight tests#27137
jkhaliqi wants to merge 1 commit intoprestodb:masterfrom
jkhaliqi:fix_gtest

Conversation

@jkhaliqi
Copy link
Contributor

@jkhaliqi jkhaliqi commented Feb 13, 2026

Description

Fixed CMake linking error in Arrow Flight connector tests by using namespaced GTest imported targets (GTest::gtest,
GTest::gtest_main) instead of plain library names (gtest, gtest_main).

Motivation and Context

The Arrow Flight connector tests were failing to link with the error ld: library 'gtest' not found because the CMakeLists.txt was using old-style plain library names instead of modern CMake imported targets. This prevented building Presto with -DPRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR=ON.

Impact

Test Plan

  • Built Presto with -DPRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR=ON
  • Verified that presto_flight_connector_test executable links successfully
  • Confirmed tests compile without linker errors

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

Summary by Sourcery

Fix Arrow Flight connector test build by linking against the correct GoogleTest CMake targets.

Bug Fixes:

  • Resolve linker failures in Arrow Flight connector tests caused by referencing non-namespaced GoogleTest libraries.

Build:

  • Update Arrow Flight connector test CMake configuration to use namespaced GTest imported targets for linkage.

@jkhaliqi jkhaliqi requested review from a team as code owners February 13, 2026 19:49
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 13, 2026
@prestodb-ci prestodb-ci requested review from a team, anandamideShakyan and libianoss and removed request for a team February 13, 2026 19:49
@jkhaliqi jkhaliqi requested a review from czentgr February 13, 2026 19:50
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 13, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Arrow Flight connector test CMake configuration to link against the modern, namespaced GTest imported targets instead of raw library names, fixing linker errors when building with the Arrow Flight connector enabled.

File-Level Changes

Change Details Files
Switch Arrow Flight connector test target to use namespaced GTest imported targets to resolve linker errors.
  • Updated the target_link_libraries list for the presto_flight_connector_test executable to replace raw gtest and gtest_main entries with GTest::gtest and GTest::gtest_main.
  • Ensured that the test executable now links against the CMake-provided GTest imported targets consistent with modern CMake usage.
presto-native-execution/presto_cpp/main/connectors/arrow_flight/tests/CMakeLists.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants