Skip to content

chore: Fix link to issue and expand comment #14473

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

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions datafusion/expr/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,8 +1906,8 @@ pub fn unnest_with_options(
.extend(std::iter::repeat(index).take(transformed_columns.len()));
Ok(transformed_columns
.iter()
.map(|(col, data_type)| {
(col.relation.to_owned(), data_type.to_owned())
.map(|(col, field)| {
(col.relation.to_owned(), field.to_owned())
})
.collect())
}
Expand Down
10 changes: 6 additions & 4 deletions datafusion/optimizer/src/decorrelate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ pub struct PullUpCorrelatedExpr {
/// Indicates if we encounter any correlated expression that can not be pulled up
/// above a aggregation without changing the meaning of the query.
can_pull_over_aggregation: bool,
/// Do we need to handle [the Count bug] during the pull up process
/// Do we need to handle [the Count bug] during the pull up process.
/// TODO this parameter should be removed or renamed semantically
///
/// [the Count bug]: https://github.com/apache/datafusion/pull/10500
/// [the Count bug]: https://github.com/apache/datafusion/issues/10553
pub need_handle_count_bug: bool,
/// mapping from the plan to its expressions' evaluation result on empty batch
pub collected_count_expr_map: HashMap<LogicalPlan, ExprResultMap>,
Expand Down Expand Up @@ -88,8 +89,9 @@ impl PullUpCorrelatedExpr {
}

/// Set if we need to handle [the Count bug] during the pull up process
/// TODO this should be removed or renamed semantically
///
/// [the Count bug]: https://github.com/apache/datafusion/pull/10500
/// [the Count bug]: https://github.com/apache/datafusion/issues/10553
pub fn with_need_handle_count_bug(mut self, need_handle_count_bug: bool) -> Self {
self.need_handle_count_bug = need_handle_count_bug;
self
Expand All @@ -111,7 +113,7 @@ impl PullUpCorrelatedExpr {
/// Used to indicate the unmatched rows from the inner(subquery) table after the left out Join
/// This is used to handle [the Count bug]
///
/// [the Count bug]: https://github.com/apache/datafusion/pull/10500
/// [the Count bug]: https://github.com/apache/datafusion/issues/10553
pub const UN_MATCHED_ROW_INDICATOR: &str = "__always_true";

/// Mapping from expr display name to its evaluation result on empty record
Expand Down
Loading