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

feat(c/driver/postgresql): implement ADBC 1.1.0 features #852

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Jun 26, 2023

@lidavidm lidavidm added this to the ADBC API Specification 1.1.0 milestone Jun 26, 2023
@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch from efe9f79 to 761f612 Compare June 27, 2023 16:55
@lidavidm lidavidm requested a review from zeroshade as a code owner June 27, 2023 17:30
@lidavidm lidavidm changed the title feat(c/driver/postgresql): implement StatementExecuteSchema feat(c/driver/postgresql): implement ADBC 1.1.0 features Jun 27, 2023
@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch 2 times, most recently from 2ce8ab0 to 9bc683c Compare June 27, 2023 20:25
@lidavidm
Copy link
Member Author

Note this can't build until SQLite and all the Go FFI is updated too (which is a pain)

@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch from 9bc683c to ec2163a Compare June 27, 2023 20:27
@lidavidm
Copy link
Member Author

lidavidm commented Jun 27, 2023

TODOs

  • INFO_DRIVER_ADBC_VERSION
  • StatementExecuteSchema
  • Current catalog/schema
  • database/statement options
  • error_details
  • ConnectionCancel
  • StatementCancel
  • ConnectionGetStatistics
  • new ingestion modes
  • port to sqlite, too
  • Address Will's review
  • Incremental execution/query progress (not practically possible in SQlite or postgres)

@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch from ec2163a to 452cd56 Compare June 29, 2023 19:36
Copy link
Contributor

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

nice work

c/driver/postgresql/connection.cc Show resolved Hide resolved
return ADBC_STATUS_NOT_FOUND;
}

if (output.size() + 1 <= *length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this raise an error when not true?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the idea is that you can check the out length, then call it again with a larger buffer if necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah OK - guessing that is already handled in the ADBC class already then? It isn't the most obvious error if the caller's buffer is too small especially since we return ADBC_STATUS_OK

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea is you can check the returned length; if it's too awkward we can consider something else but I dislike trying to overload the return code to mean anything except an error (and I don't think this is strictly an error)

@lidavidm lidavidm marked this pull request as draft July 20, 2023 16:53
@lidavidm lidavidm force-pushed the spec-1.1.0 branch 3 times, most recently from d6a083c to d501092 Compare July 21, 2023 18:37
@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch 6 times, most recently from dde3bae to e4a7081 Compare July 24, 2023 19:43
@lidavidm lidavidm marked this pull request as ready for review July 24, 2023 19:43
@lidavidm
Copy link
Member Author

@lidavidm
Copy link
Member Author

Will merge once I get green CI on my branch (https://github.com/lidavidm/arrow-adbc/tree/spec-1.1.0-execute-schema-cpp)

@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch 2 times, most recently from 250e39a to b0050a2 Compare July 25, 2023 19:52
@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch 5 times, most recently from a1b821f to d1f8890 Compare July 26, 2023 14:31
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (apache#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA) (apache#319)
- ConnectionCancel/StatementCancel
- GetOption/SetOption
- Ingest modes
@lidavidm lidavidm force-pushed the spec-1.1.0-execute-schema-cpp branch from d1f8890 to 144244f Compare July 26, 2023 15:03
@lidavidm lidavidm merged commit 1205cbb into apache:spec-1.1.0 Jul 26, 2023
2 checks passed
@lidavidm lidavidm deleted the spec-1.1.0-execute-schema-cpp branch July 26, 2023 15:16
lidavidm added a commit that referenced this pull request Aug 3, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
lidavidm added a commit that referenced this pull request Aug 3, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
lidavidm added a commit that referenced this pull request Aug 10, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
lidavidm added a commit that referenced this pull request Aug 10, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
lidavidm added a commit that referenced this pull request Aug 10, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
lidavidm added a commit that referenced this pull request Aug 28, 2023
- ADBC_INFO_DRIVER_ADBC_VERSION
- StatementExecuteSchema (#318)
- ADBC_CONNECTION_OPTION_CURRENT_{CATALOG, DB_SCHEMA} (#319)
- Cancellation
- Get/SetOption
- New ingest modes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants