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

add support for reading from "file://" for parquet_scan #1164

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

universalmind303
Copy link
Contributor

@universalmind303 universalmind303 commented Jun 21, 2023

follow up from #1160.

in addition to the http/https schemes, we also support file://

select * from parquet_scan('file://path/to/file.parquet');

@universalmind303 universalmind303 changed the title add support for reading from "file://" add support for reading from "file://" for parquet_scan Jun 21, 2023
Copy link
Member

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

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

Ship it!

pub trait TableAccessor: Send + Sync {
fn store(&self) -> &Arc<dyn ObjectStore>;

fn object_meta(&self) -> &Arc<ObjectMeta>;
async fn into_table_provider(self, predicate_pushdown: bool) -> Result<Arc<dyn TableProvider>>;
Copy link
Member

Choose a reason for hiding this comment

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

imo we should remove predicate_pushdown (can do later). I don't know when there's a time where we don't want this.

Copy link
Contributor Author

@universalmind303 universalmind303 Jun 21, 2023

Choose a reason for hiding this comment

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

if we remove, then couldn't we just change this use the std TryInto?

Copy link
Member

Choose a reason for hiding this comment

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

Nah, we still need it be async since there's a bit of setup done in this function for some data sources (e.g. for postgres we need to make a connection and run a query to get the schema).

Copy link
Member

Choose a reason for hiding this comment

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

I mean would could do IntoFuture (https://doc.rust-lang.org/std/future/trait.IntoFuture.html), but I'm not really feelin it...

@universalmind303 universalmind303 enabled auto-merge (squash) June 21, 2023 19:32
@scsmithr scsmithr disabled auto-merge June 21, 2023 19:35
@scsmithr scsmithr merged commit 7caa2cc into GlareDB:main Jun 21, 2023
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.

2 participants