-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replacing SessionState
with Session
and progress towards moving FileFormatFactory
out of datasource
#14517
Conversation
#[derive(Debug)] | ||
struct FileGroupsDisplay<'a>(&'a [Vec<PartitionedFile>]); | ||
|
||
impl DisplayAs for FileGroupsDisplay<'_> { |
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.
maybe, keeping a separate file for addition on old file_scan_config
would be better?
@alamb do you think this is correct approach to make progress? |
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.
I just a first pass super quick skim of this and I'm not seeing anything crazy. I'll have to read through again while I have time to think harder and double check the places where code is moving before I give a +1 though,.
@@ -26,13 +26,13 @@ | |||
|
|||
use std::sync::Arc; | |||
|
|||
use crate::datasource::listing::PartitionedFile; | |||
use crate::PartitionedFile; |
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 great
@@ -28,6 +28,7 @@ rust-version.workspace = true | |||
version.workspace = true | |||
|
|||
[dependencies] | |||
apache-avro = { version = "0.17", optional = true } |
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 unfortunate -- is there any way we can avoid the (direct) avro dependency on the listing table? If not it is fine for this PR I was just wondering
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.
Unfortunately, I think this OR had major conflicts with
@logan-keede is there any chance you are willing to take a look at the new structure and rework this PR?
Sure, I was kinda expecting this. |
this downcast introduced in #14224, probably needs to be moved/removed(for this issue), but I am not sure where/how, or can we make do without it(like before)? @mertak-synnada do you have any Idea? |
One solution, I can think of right now, is to have multiple |
Sorry I'm pretty new to this issue's context, Is it a problem because of dependency? Edit: On a second thought, calling
And overriding this in |
I figured it would be better to start anew, so #14543 |
Which issue does this PR close?
datafusion-catalog-listing
out ofcore/src/datasource
#14462datafusion
crate (datafusion/core
) #14444.Rationale for this change
SessionState
needs to be replaced withSession
indatasource
to split it out ofcore
.get_file_format_factory
needs to be implemented forSession
datafusion/datafusion/core/src/datasource/file_format/mod.rs
Line 64 in 304488d
FileScanConfig
todatafusion-catalog-listing
(or some other place, but out of core)What changes are included in this PR?
Refactoring,
SessionState
->dyn Session
+ some downcast to be removed later.FileScanConfig
todatafusion-catalog-listing
Are these changes tested?
Are there any user-facing changes?
There should not be