-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 generate_series() udtf (and introduce 'lazy' MemoryExec
)
#13540
base: main
Are you sure you want to change the base?
Changes from 4 commits
ac50592
92e94e6
95f95f2
5df8964
fd2a808
765d9a7
4e76e3e
07126eb
e5834b7
e775df4
cd38a60
28f0f33
f171bee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,8 @@ use crate::datasource::provider::DefaultTableFactory; | |
use crate::execution::context::SessionState; | ||
#[cfg(feature = "nested_expressions")] | ||
use crate::functions_nested; | ||
use crate::{functions, functions_aggregate, functions_window}; | ||
use crate::{functions, functions_aggregate, functions_table, functions_window}; | ||
use datafusion_catalog::TableFunction; | ||
use datafusion_execution::config::SessionConfig; | ||
use datafusion_execution::object_store::ObjectStoreUrl; | ||
use datafusion_execution::runtime_env::RuntimeEnv; | ||
|
@@ -119,6 +120,11 @@ impl SessionStateDefaults { | |
functions_window::all_default_window_functions() | ||
} | ||
|
||
/// returns the list of default [`TableFunction`]s | ||
pub fn default_table_functions() -> Vec<Arc<TableFunction>> { | ||
functions_table::all_default_table_functions() | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we get the defaults from a singleton ? Like other default getters, with get_or_init or smth similar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good idea, updated |
||
/// returns the list of default [`FileFormatFactory']'s | ||
pub fn default_file_formats() -> Vec<Arc<dyn FileFormatFactory>> { | ||
let file_formats: Vec<Arc<dyn FileFormatFactory>> = vec![ | ||
|
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 much more consistent with other UDFs
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 the part of the refactor, changing this requires several fixes. We can leave it to a separate PR to make this PR smaller
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 also recommend to take
name()
insideTableFunctionImpl
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 think doing it as a follow on PR makes sense to me -- perhaps we can file a ticket
Another thing that would be nice for a follow on PR is to move this trait into its own module (
catalog/src/table_function.rs
perhaps)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.
Filed #13613