Skip to content

Apache DataFusion SQL Query Engine

chore: Fix link to issue and expand comment (#14473)

Piotr Findeisen0a0ef5ce51ec
diff --git a/datafusion/expr/src/logical_plan/builder.rs b/datafusion/expr/src/logical_plan/builder.rs
index 6203793ec6..175abe95e6 100644
--- a/datafusion/expr/src/logical_plan/builder.rs
+++ b/datafusion/expr/src/logical_plan/builder.rs
@@ -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())
}
diff --git a/datafusion/optimizer/src/decorrelate.rs b/datafusion/optimizer/src/decorrelate.rs
index 36da61f4e8..b192f97404 100644
--- a/datafusion/optimizer/src/decorrelate.rs
+++ b/datafusion/optimizer/src/decorrelate.rs
@@ -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>,
@@ -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
@@ -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