goldmedal commented on code in PR #11724:
URL: https://github.com/apache/datafusion/pull/11724#discussion_r1702722535
##########
datafusion/common/src/column.rs:
##########
@@ -156,6 +157,17 @@ impl Column {
}
}
+ fn quoted_flat_name_if_contain_dot(&self) -> String {
+ match &self.relation {
+ Some(r) => format!(
+ "{}.{}",
+ table_reference_to_quoted_string(r),
+ quoted_if_contain_dot(&self.name)
+ ),
+ None => quoted_if_contain_dot(&self.name).to_string(),
+ }
+ }
Review Comment:
@jayzhan211 Before I fix other tests, I want to check if this behavior
makes sense. (It involves too many tests 😢 ).
Now, we only quote an identifier if it contains the dot. However, some cases
like `sum(t1.c1)` will also be quoted, even if it's a function call. I think
it's not worth doing more checking to exclude this kind of case. What do you
think?
--
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]