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

Implement table/column reflection #14

Closed
lidavidm opened this issue Jun 13, 2022 · 1 comment · Fixed by #18
Closed

Implement table/column reflection #14

lidavidm opened this issue Jun 13, 2022 · 1 comment · Fixed by #18

Comments

@lidavidm
Copy link
Member

See lidavidm/arrow#9

Similar to AdbcConnectionGetTables, there should be a way to query the columns available in a table with their names, types, NULL-ness etc.

I was basically modeling this off of Flight SQL: https://github.com/apache/arrow/blob/master/format/FlightSql.proto

In this case GetTables has a parameter to optionally fetch the Arrow schema of the tables as well. And then SQL-specific type info is encoded as column metadata.

I recall we talked about using something like MSSQL information_schema instead. This was also debated for Flight SQL. We decided against it since databases don't necessarily implement this, or implement slightly different things, and there's no easy way for a client to figure this out. Also, then you're dependent on knowing the database's SQL dialect in order to introspect it. While explicit calls like GetTables are tedious and less flexible, they don't require so much bootstrapping. (This is important for Flight SQL which does not want to have to implement client-side drivers; a Flight SQL client should be compatible with any database implementing the protocol. ADBC doesn't necessarily have the same constraint, though.)

GetTables needs to also (optionally) return the schema. Or we could have a separate method that models the schema explicitly? The difference would be that we could explicitly model the SQL-database metadata (which Flight SQL stuffs into Arrow field metadata)

@lidavidm
Copy link
Member Author

Also see lidavidm/arrow#6 where we need to clarify the signature for GetTables

lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Jun 15, 2022
This was referenced Jun 15, 2022
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Jun 21, 2022
lidavidm added a commit that referenced this issue Jun 23, 2022
Fixes #14.

* Implement proposed metadata API

* Implement proposed API for constraint metadata

* Remove redundant metadata methods
@lidavidm lidavidm added this to the 0.1.0 milestone Dec 26, 2022
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 a pull request may close this issue.

1 participant