andygrove commented on code in PR #3209:
URL: https://github.com/apache/arrow-datafusion/pull/3209#discussion_r950490948
##########
datafusion/sql/src/planner.rs:
##########
@@ -189,8 +191,14 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
query,
with_options,
..
- } if columns.is_empty() && with_options.is_empty() => {
- let plan = self.query_to_plan(*query, &mut HashMap::new())?;
+ } if with_options.is_empty() => {
+ let columns = if columns.is_empty() {
+ None
+ } else {
+ Some(columns)
+ };
+ let plan =
+ self.query_to_plan(*query, &mut HashMap::new(),
columns.as_ref())?;
Review Comment:
I'm not sure I understand why we don't have the projection logic here since
this is specific to views, rather than passing the columns down into
`query_to_plan`.
--
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]