jayzhan211 commented on code in PR #11724: URL: https://github.com/apache/datafusion/pull/11724#discussion_r1701923500
########## datafusion/common/src/column.rs: ########## @@ -372,7 +372,7 @@ impl FromStr for Column { impl fmt::Display for Column { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.flat_name()) + write!(f, "{}", self.quoted_flat_name()) Review Comment: identifier could includes dot, that is the reason we need double quotation to differentiate it from qualified column, it is also relatively rare compare to column, so we don't have double quote every where. In duckdb, they also has double quote for alias name (identifier). ``` D select t.a from t; ┌───────┐ │ a │ │ int32 │ ├───────┤ │ 1 │ └───────┘ D select t.a as t.a from t; Parser Error: syntax error at or near "." LINE 1: select t.a as t.a from t; ^ D select t.a as "t.a" from t; ┌───────┐ │ t.a │ │ int32 │ ├───────┤ │ 1 │ └───────┘ ``` If we want to introduce dot notation for struct `a.b`, it is consistent to duckdb if we don't have double quote for column. https://duckdb.org/docs/sql/data_types/struct.html -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org