Skip to content

feat(format): add generic metadata API#4544

Open
lidavidm wants to merge 4 commits into
apache:spec-1.2.0from
lidavidm:gh-4400
Open

feat(format): add generic metadata API#4544
lidavidm wants to merge 4 commits into
apache:spec-1.2.0from
lidavidm:gh-4400

Conversation

@lidavidm

@lidavidm lidavidm commented Jul 20, 2026

Copy link
Copy Markdown
Member
  • Add a generic API for fetching metadata, modeled on ADO.NET's GetSchema
  • Define the standard metadata collections
  • Revert the current revisions to GetObjects in favor of not changing it

Related:

For consideration:

  • Should filters be (optionally) named arguments? (Pointer to struct) The justification: we could more easily implement/define "standard" arguments to handle things like the pagination token above without having to replicate it into every single definition
  • Should filters be typed? (Pointer to struct containing union)
  • Should filters be replaced by just leveraging SetOption(Int,...)? (This would obviate the former two points but is rather clunky, and precludes a hypothetical driver that could handle these operations concurrently)

Closes #4400.

@lidavidm
lidavidm requested a review from CurtHagenlocher July 20, 2026 06:55
@lidavidm

Copy link
Copy Markdown
Member Author

Also CC @iconara

I've also been thinking about your request for stateless pagination, and I think it's reasonable enough to define a way to get/pass a pagination token. I think there are enough systems that could use it: Athena, BigQuery, Databricks, Snowflake, Iceberg REST catalog, etc.

@lidavidm

Copy link
Copy Markdown
Member Author

And also CC @mullinsms, who kicked all this off by listing all the types of metadata we didn't support 🙂

In particular, Curt's suggestion means we can support database-specific metadata (though, I'm still of the opinion that something truly database-specific is probably better handled by the application; if the application has a very specific metadata query it wants to issue I'm not sure how useful it is to build it into the driver).

@lidavidm
lidavidm requested a review from paleolimbot July 20, 2026 07:06
@lidavidm

Copy link
Copy Markdown
Member Author

At the risk of overcomplicating things: similar to #3623, it might be nice to have a way to request that certain extra fields be included/omitted, e.g. table properties (#3995), where it may be efficient to fetch the data at the same time as the "standard" fields, but where some (many) clients also may not want the field. Maybe it could optionally take an Arrow schema as input for that.

Similarly, maybe the application wants to opt in to run-length-encoding certain response columns to save memory. (Or is that not really a concern so long as things are properly streamed/paginated?)

@lidavidm lidavidm changed the title feat(format): add generic metadata API [WIP] feat(format): add generic metadata API Jul 22, 2026
@lidavidm
lidavidm marked this pull request as ready for review July 22, 2026 04:39
@lidavidm
lidavidm requested a review from zeroshade as a code owner July 22, 2026 04:39
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.

1 participant