Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: Postgres sink issues #16745

Open
2 tasks
StrikeW opened this issue May 14, 2024 · 2 comments
Open
2 tasks

Tracking: Postgres sink issues #16745

StrikeW opened this issue May 14, 2024 · 2 comments
Labels
help wanted Issues that need help from contributors type/feature
Milestone

Comments

@StrikeW
Copy link
Contributor

StrikeW commented May 14, 2024

@github-actions github-actions bot added this to the release-1.10 milestone May 14, 2024
@fuyufjh
Copy link
Contributor

fuyufjh commented May 14, 2024

I am thinking about rewriting the Postgres sink with Rust tokio_postgres and leverage the ScalarAdapter

+1 for migrating from JDBC to native implementation. My intuitive is that JDBC adds another abstraction layer and makes it more difficult for us to make all data type conversion consistent among source/sink systems. Let alone the performance loss.

@xiangjinwu
Copy link
Contributor

  • Agree to implement the sink in rust and avoid going thru JDBC.

  • I find that it might be difficult to support this via JDBC interface, since java.sql.Types doesn't have a type corresponding to UUID array, so we cannot get the uuid array type from the prepared statement.

    It is doable. The following snippet outputs _uuid, which means array of uuid in PostgreSQL (just like _float8 is double precision[]).

      PreparedStatement stp = conn.prepareStatement("select array['018f761c-a819-748a-863f-52204f67aa2a'::uuid] = ?;"
      System.out.println(stp.getParameterMetaData().getParameterTypeName(1));
    

    Just sharing it is possible. But for a better future I am also in favor of the rust implementation.

@StrikeW StrikeW added the good first issue Good for newcomers label May 15, 2024
@fuyufjh fuyufjh added help wanted Issues that need help from contributors and removed good first issue Good for newcomers labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need help from contributors type/feature
Projects
None yet
Development

No branches or pull requests

3 participants