tustvold commented on code in PR #4767:
URL: https://github.com/apache/arrow-datafusion/pull/4767#discussion_r1058873296
##########
datafusion/optimizer/src/scalar_subquery_to_join.rs:
##########
@@ -242,7 +245,7 @@ fn optimize_scalar(
}
// Only operate if one column is present and the other closed upon from
outside scope
- let subqry_alias = format!("__sq_{}", config.next_id());
+ let subqry_alias = alias.next("__scalar_sq");
Review Comment:
I debated passing an `Arc<AliasGenerator>` into each of the rules, this
created a fair amount of churn, and it is easier for the rules to just assign a
unique prefix. As an added bonus it highlights where the alias came from, which
is nice I guess
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]