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

Rename Expr::display_name to Expr::schema_name, make UNNEST naming conform to convention #11797

Merged
merged 36 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b333242
introduce schema_name
jayzhan211 Aug 4, 2024
16fd0aa
fix
jayzhan211 Aug 4, 2024
6923d84
cleanup
jayzhan211 Aug 4, 2024
9ff1869
cleanup
jayzhan211 Aug 4, 2024
881bccd
fix doc
jayzhan211 Aug 4, 2024
d64ca1e
reuse for simple case
jayzhan211 Aug 4, 2024
92d6fa0
unnest + udf
jayzhan211 Aug 4, 2024
9f77b0e
fmt
jayzhan211 Aug 4, 2024
d324fb8
add display name for udf
jayzhan211 Aug 4, 2024
8760d56
fix name in udf
jayzhan211 Aug 4, 2024
af49720
rename unnest
jayzhan211 Aug 4, 2024
2284535
rm column
jayzhan211 Aug 4, 2024
2a8350e
inlis
jayzhan211 Aug 4, 2024
4ddf57e
fmt
jayzhan211 Aug 4, 2024
7ba77ca
udaf
jayzhan211 Aug 4, 2024
04dd18b
case
jayzhan211 Aug 4, 2024
a39212e
use write
jayzhan211 Aug 4, 2024
7384bb8
fix test
jayzhan211 Aug 4, 2024
9f82bac
fix window
jayzhan211 Aug 4, 2024
da2a1f1
window
jayzhan211 Aug 4, 2024
8f3d64a
like and similar to
jayzhan211 Aug 4, 2024
8adde19
rm display name
jayzhan211 Aug 4, 2024
820b3a5
comment
jayzhan211 Aug 4, 2024
89d3da8
cliip
jayzhan211 Aug 4, 2024
5f80753
fix doc
jayzhan211 Aug 4, 2024
cea8197
Merge remote-tracking branch 'upstream/main' into expr-name
jayzhan211 Aug 4, 2024
c346d76
display
jayzhan211 Aug 4, 2024
d8e6fd6
Merge branch 'main' of https://github.com/apache/datafusion into expr…
jayzhan211 Aug 5, 2024
293117a
fix conflict
jayzhan211 Aug 5, 2024
ad1a40e
Merge branch 'main' of https://github.com/apache/datafusion into expr…
jayzhan211 Aug 6, 2024
8cb9523
Merge branch 'main' of https://github.com/apache/datafusion into expr…
jayzhan211 Aug 6, 2024
484e1ad
fix merge conflict
jayzhan211 Aug 6, 2024
2b69fe9
with display
jayzhan211 Aug 7, 2024
136e900
function for exprs
jayzhan211 Aug 7, 2024
58957e4
clippy
jayzhan211 Aug 7, 2024
e89e10b
fix doc
jayzhan211 Aug 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions datafusion/core/src/physical_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
let expr = create_physical_name(expr, false)?;
Ok(format!("{expr} IS NOT UNKNOWN"))
}
Expr::ScalarFunction(fun) => fun.func.display_name(&fun.args),
Expr::ScalarFunction(fun) => fun.func.schema_name(&fun.args),
Expr::WindowFunction(WindowFunction {
fun,
args,
Expand Down Expand Up @@ -1794,7 +1794,7 @@ pub fn create_window_expr(
// unpack aliased logical expressions, e.g. "sum(col) over () as total"
let (name, e) = match e {
Expr::Alias(Alias { expr, name, .. }) => (name.clone(), expr.as_ref()),
_ => (e.display_name()?, e),
_ => (e.schema_name()?, e),
};
create_window_expr_with_name(e, name, logical_schema, execution_props)
}
Expand Down Expand Up @@ -1887,7 +1887,7 @@ pub fn create_aggregate_expr_and_maybe_filter(
// unpack (nested) aliased logical expressions, e.g. "sum(col) as total"
let (name, e) = match e {
Expr::Alias(Alias { expr, name, .. }) => (name.clone(), expr.as_ref()),
Expr::AggregateFunction(_) => (e.display_name().unwrap_or(physical_name(e)?), e),
Expr::AggregateFunction(_) => (e.schema_name().unwrap_or(physical_name(e)?), e),
_ => (physical_name(e)?, e),
};

Expand Down
Loading
Loading