Skip to content

Conversation

@Mandukhai-Alimaa
Copy link
Contributor

Implement StatementGetParameterSchema and add tests.

Newly added test passes
All the other PostgreSQL driver tests pass

Closes #2880

@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Oct 16, 2025
void TestSqlPrepareErrorParamCountMismatch() { GTEST_SKIP() << "Not yet implemented"; }
void TestSqlPrepareGetParameterSchema() { GTEST_SKIP() << "Not yet implemented"; }

void TestSqlPrepareGetParameterSchema() {
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to just remove the line and let the base class's test run.

Comment on lines 766 to 767
InternalAdbcSetError(error, "%s",
"[libpq] Must SetSqlQuery before GetParameterSchema");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
InternalAdbcSetError(error, "%s",
"[libpq] Must SetSqlQuery before GetParameterSchema");
InternalAdbcSetError(error, "[libpq] Must SetSqlQuery before GetParameterSchema");

@lidavidm
Copy link
Member

There also appears to be a memory leak according to the integration tests

@lidavidm lidavidm merged commit 5045b11 into apache:main Oct 17, 2025
70 of 76 checks passed
michalc added a commit to michalc/pgarrow that referenced this pull request Dec 7, 2025
This increases the minimum version of adbc-driver-postgresql to 1.9.0. While we
could support older versions still

- We run up against GitHub actions limits by trying to test absolutely every
  version. Assuming adbc-driver-postgresql is semver, each minor version is
  backward compatible, so it shouldn't be a problem for client code to upgrade.

- And it makes it easier in documentation, tests, and suspect future code that
  we can assume that apache/arrow-adbc#3579 is part of
  adbc-driver-postgresql, which allows preparing queries to return
  as-accurate-as-possible type information for bind parameters in queries, which
  addresses at least in part the issues raised in
  apache/arrow-adbc#2865 (comment)
michalc added a commit to michalc/pgarrow that referenced this pull request Dec 7, 2025
This increases the minimum version of adbc-driver-postgresql to 1.9.0. While we
could support older versions still

- We run up against GitHub actions limits by trying to test absolutely every
  version. Assuming adbc-driver-postgresql is semver, each minor version is
  backward compatible, so it shouldn't be a problem for client code to upgrade.

- And it makes it easier in documentation, tests, and suspect future code that
  we can assume that apache/arrow-adbc#3579 is part of
  adbc-driver-postgresql, which allows preparing queries to return
  as-accurate-as-possible type information for bind parameters in queries, which
  addresses at least in part the issues raised in
  apache/arrow-adbc#2865 (comment)

This itself requires a bump to the minimum version of Python to 3.10.0. While
slightly unfortunate, Python 3.9 is EOL at the time of writing, and can't
support everything for ever: suspect there are better ways to use time.
michalc added a commit to michalc/pgarrow that referenced this pull request Dec 7, 2025
This increases the minimum version of adbc-driver-postgresql to 1.9.0. While we
could support older versions still

- We run up against GitHub actions limits by trying to test absolutely every
  version. Assuming adbc-driver-postgresql is semver, each minor version is
  backward compatible, so it shouldn't be a problem for client code to upgrade.

- And it makes it easier in documentation, tests, and suspect future code that
  we can assume that apache/arrow-adbc#3579 is part of
  adbc-driver-postgresql, which allows preparing queries to return
  as-accurate-as-possible type information for bind parameters in queries, which
  addresses at least in part the issues raised in
  apache/arrow-adbc#2865 (comment)

This itself requires a bump to the minimum version of Python to 3.10.0. While
slightly unfortunate, Python 3.9 is EOL at the time of writing, and can't
support everything for ever: suspect there are better ways to use time.
michalc added a commit to michalc/pgarrow that referenced this pull request Dec 7, 2025
This increases the minimum version of adbc-driver-postgresql to 1.9.0. While we
could support older versions still

- We run up against GitHub actions limits by trying to test absolutely every
  version. Assuming adbc-driver-postgresql is semver, each minor version is
  backward compatible, so it shouldn't be a problem for client code to upgrade.

- And it makes it easier in documentation, tests, and suspect future code that
  we can assume that apache/arrow-adbc#3579 is part of
  adbc-driver-postgresql, which allows preparing queries to return
  as-accurate-as-possible type information for bind parameters in queries, which
  addresses at least in part the issues raised in
  apache/arrow-adbc#2865 (comment)

This itself requires a bump to the minimum version of Python to 3.10.0. While
slightly unfortunate, Python 3.9 is EOL at the time of writing, and can't
support everything for ever: suspect there are better ways to use time.
michalc added a commit to michalc/pgarrow that referenced this pull request Dec 7, 2025
feat: bump adbc-driver-postgresql>=1.9.0 and Python>=3.10.0

This increases the minimum version of adbc-driver-postgresql to 1.9.0. While we
could support older versions still

- We run up against GitHub actions limits by trying to test absolutely every
  version. Assuming adbc-driver-postgresql is semver, each minor version is
  backward compatible, so it shouldn't be a problem for client code to upgrade.

- And it makes it easier in documentation, tests, and suspect future code that
  we can assume that apache/arrow-adbc#3579 is part of
  adbc-driver-postgresql, which allows preparing queries to return
  as-accurate-as-possible type information for bind parameters in queries, which
  addresses at least in part the issues raised in
  apache/arrow-adbc#2865 (comment)

This itself requires a bump to the minimum version of Python to 3.10.0. While
slightly unfortunate, Python 3.9 is EOL at the time of writing, and can't
support everything for ever: suspect there are better ways to use time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

c/driver/postgresql: implement StatementGetParameterSchema

2 participants