-
Notifications
You must be signed in to change notification settings - Fork 1.5k
TableProvider
to skip files in the folder which non relevant to selected reader
#16487
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
Conversation
TableProvider
to skip files in the folder which non relevant to selected reader
@@ -125,6 +125,13 @@ impl TableProviderFactory for ListingTableFactory { | |||
// specifically for parquet file format. | |||
// See: https://github.com/apache/datafusion/issues/7317 | |||
None => { | |||
// if the folder then rewrite a file path as 'path/*.parquet' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an actual fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will mean a directory of files like foo/my_file.parquet.snappy
would not be readable anymore -- I think that spark creates files like my_file.snappy.parquet
so it should be ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be ok, compressed files are usually *.codec.parquet
and more broad wildcard *.parquet
should read them. My local test I did against part-00000-9b95f137-d11f-44b6-84b7-d49c95bc7c5b-c000.snappy.parquet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me -- thank you @comphead
@@ -125,6 +125,13 @@ impl TableProviderFactory for ListingTableFactory { | |||
// specifically for parquet file format. | |||
// See: https://github.com/apache/datafusion/issues/7317 | |||
None => { | |||
// if the folder then rewrite a file path as 'path/*.parquet' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will mean a directory of files like foo/my_file.parquet.snappy
would not be readable anymore -- I think that spark creates files like my_file.snappy.parquet
so it should be ok
Which issue does this PR close?
datafusion
read parquet folders if non parquet files exists #16460 .Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?