yonatan-sevenai commented on code in PR #21593:
URL: https://github.com/apache/datafusion/pull/21593#discussion_r3100787265
##########
datafusion/sql/src/unparser/ast.rs:
##########
@@ -688,6 +697,94 @@ impl Default for UnnestRelationBuilder {
}
}
+/// Default table alias for FLATTEN table factors.
+/// Snowflake requires an alias to reference output columns (e.g.
`_unnest.VALUE`).
+pub const FLATTEN_DEFAULT_ALIAS: &str = "_unnest";
Review Comment:
Good catch.
I implemented something at the SelectBuilder level.
Didn't see a good natural place for this counter as the FlattenBuilder can
be called multiple times in one SelectBuilder which is where that context gets
naturally saved.
Any thoughts on a better pattern?
--
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]