Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Integrate Trino as a data source using sfu-db/connector-x#405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
vcknorket wants to merge10 commits intoroapi:main
base:main
Choose a base branch
Loading
fromknorket:feat-trino-connector

Conversation

@vcknorket
Copy link

This commit introduces support for Trino as a data source by updating the connector-x dependency and integrating its Trino capabilities.

Key changes include:

  1. Dependency Update:

    • Switchedconnectorx incolumnq/Cargo.toml from the forked
      roapi/connector-x to the officialsfu-db/connector-x
      (version0.4.4-alpha.1).
    • Updatedconnectorx features to["fptr", "src_trino", "dst_arrow"].
  2. Core Logic for Trino:

    • Added aTrino variant to theDatabaseLoader enum in
      columnq/src/table/database.rs.
    • Updated conditional compilation flags incolumnq/src/table/database.rs
      to includedatabase-trino.
    • Incolumnq/src/table/mod.rs:
      • AddedTrino to theExtension enum and updated itsFrom
        andTryFrom implementations.
      • Added atrino { table: Option<String> } variant to the
        TableLoadOption enum.
      • UpdatedTableLoadOption::extension() method.
      • UpdatedTableSource::parse_option() to recognize "trino" URIs.
      • Updated the mainload() function to handle Trino.
    • Modified table name extraction incolumnq/src/table/database.rs
      to supportTableLoadOption::trino.
  3. Cargo Feature Flag:

    • Addeddatabase-trino = ["connectorx/src_trino"] to the
      [features] section incolumnq/Cargo.toml.
    • Includeddatabase-trino in thedatabase feature group.
  4. Testing:

    • Added a new test filecolumnq/tests/table_trino_test.rs.
    • This includes a basic compile-time and structural test for the
      Trino integration, conditional on thedatabase-trino feature.
    • A comment in the test notes that full integration testing requires
      a live Trino instance and appropriate environment setup.

This integration allows you to specify Trino as a data source via URI or configuration, leveraging the capabilities of the underlyingsfu-db/connector-x library.

YuriyGavrilov reacted with rocket emoji
This commit introduces support for Trino as a data source by updatingthe connector-x dependency and integrating its Trino capabilities.Key changes include:1.  **Dependency Update:**    *   Switched `connectorx` in `columnq/Cargo.toml` from the forked        `roapi/connector-x` to the official `sfu-db/connector-x`        (version `0.4.4-alpha.1`).    *   Updated `connectorx` features to `["fptr", "src_trino", "dst_arrow"]`.2.  **Core Logic for Trino:**    *   Added a `Trino` variant to the `DatabaseLoader` enum in        `columnq/src/table/database.rs`.    *   Updated conditional compilation flags in `columnq/src/table/database.rs`        to include `database-trino`.    *   In `columnq/src/table/mod.rs`:        *   Added `Trino` to the `Extension` enum and updated its `From`            and `TryFrom` implementations.        *   Added a `trino { table: Option<String> }` variant to the            `TableLoadOption` enum.        *   Updated `TableLoadOption::extension()` method.        *   Updated `TableSource::parse_option()` to recognize "trino" URIs.        *   Updated the main `load()` function to handle Trino.    *   Modified table name extraction in `columnq/src/table/database.rs`        to support `TableLoadOption::trino`.3.  **Cargo Feature Flag:**    *   Added `database-trino = ["connectorx/src_trino"]` to the        `[features]` section in `columnq/Cargo.toml`.    *   Included `database-trino` in the `database` feature group.4.  **Testing:**    *   Added a new test file `columnq/tests/table_trino_test.rs`.    *   This includes a basic compile-time and structural test for the        Trino integration, conditional on the `database-trino` feature.    *   A comment in the test notes that full integration testing requires        a live Trino instance and appropriate environment setup.This integration allows you to specify Trino as a data source viaURI or configuration, leveraging the capabilities of the underlying`sfu-db/connector-x` library.
// but avoid pulling in too much if it complicates things without a live server.

#[tokio::test]
async fn test_trino_loader_construction() {
Copy link
Member

Choose a reason for hiding this comment

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

this test doesn't seem to do anything? I am okay with merging without a test if it's too much work to setup trio in the CI.

@houqp
Copy link
Member

thanks for the contribution, but looks like the build is broken.

Copy link
Author

@vcknorketvcknorket left a comment

Choose a reason for hiding this comment

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

removed test

rusqlite version
rusqlite version update
Update get_arrow call to match connectorx API"
Enable Arrow 54 use 55
Revert the changes made
Update arrow version to be specific
@vcknorket
Copy link
Author

Seems like having issue with arrow version. sfu-db/connector does not use 55 yet but they they it will work but seems like the version is causing issues@houqp@tobyhede can you help here?

@houqp
Copy link
Member

@vcknorket you will need to send an upstream PR to connector to bump their version of arrow to 55 first.

@vcknorket
Copy link
Author

vcknorket commentedJun 27, 2025 via email

Seems someone already asked the upstream but they said...it cannot be done but suggest that it should still work
________________________________From: QP Hou ***@***.***>Sent: June 27, 2025 2:47 AMTo: roapi/roapi ***@***.***>Cc: Venkata Chandra (VC) ***@***.***>; Mention ***@***.***>Subject: Re: [roapi/roapi] feat: Integrate Trino as a data source using sfu-db/connector-x (PR#405)[https://avatars.githubusercontent.com/u/670302?s=20&v=4]houqp left a comment (roapi/roapi#405)<#405 (comment)>@vcknorket<https://github.com/vcknorket> you will need to send an upstream PR to connector to bump their version of arrow to 55 first.—Reply to this email directly, view it on GitHub<#405 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWCT64STYLLUBJHQDMTLJML3FTSG3AVCNFSM6AAAAAB7JE2GWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJRHA4TGNBZG4>.You are receiving this because you were mentioned.Message ID: ***@***.***>

@houqp
Copy link
Member

@vcknorket you should be able to upgrade, I have don't that a few times in the past. Could you link me to the discussion?

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

Reviewers

@houqphouqphouqp left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vcknorket@houqp

[8]ページ先頭

©2009-2025 Movatter.jp