Skip to content

Conversation

fpetkovski
Copy link

Which issue does this PR close?

Rationale for this change

The commit adds support for creating external tables that can reference multiple file locations. This is useful for querying files from multiple folders, or for scoping down an external table to specific files inside a single folder.

The change is implemented by splitting the location string on the , delimiter as suggested in the original issue.

Are these changes tested?

There is an added unit test for this change. I also did manual testing against the branch.

Are there any user-facing changes?

This feature does make a backwards compatible user-facing change, which should require documentation updates.

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions core Core DataFusion crate catalog Related to the catalog crate proto Related to proto crate labels Sep 21, 2025
state: &dyn Session,
cmd: &CreateExternalTable,
) -> Result<Arc<dyn TableProvider>> {
let location = match cmd.locations.len() {
Copy link
Author

Choose a reason for hiding this comment

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

I wonder if there's a better way to constrain the API for this function to a single file location without throwing a runtime error if multiple are provided.

@alamb
Copy link
Contributor

alamb commented Sep 29, 2025

Thank you for this PR @fpetkovski -- I plan to review it carefully in the next day or two

@fpetkovski
Copy link
Author

Thank you @alamb. I am aware of the CI issues and plan to address them. I was hoping to first get feedback on the overall direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
catalog Related to the catalog crate core Core DataFusion crate logical-expr Logical plan and expressions proto Related to proto crate sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants