phillipleblanc commented on code in PR #13062:
URL: https://github.com/apache/datafusion/pull/13062#discussion_r1810996894
##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -733,10 +733,10 @@ impl Unparser<'_> {
// So we will append the alias to this subquery.
// Example:
// select * from t1 limit 10 -> (select * from t1 limit 10)
as a
- if alias.is_some()
- && (table_scan.projection.is_none() &&
table_scan.filters.is_empty())
- {
- builder = builder.alias(alias.clone().unwrap())?;
+ if let Some(alias) = alias {
+ if table_scan.projection.is_none() &&
table_scan.filters.is_empty() {
+ builder = builder.alias(alias.clone())?;
Review Comment:
```suggestion
builder = builder.alias(alias)?;
```
I don't believe this final clone is needed, since its the last place to use
it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]