martin-g commented on code in PR #19339:
URL: https://github.com/apache/datafusion/pull/19339#discussion_r2623821185
##########
datafusion/sql/src/expr/identifier.rs:
##########
Review Comment:
Is the same fix needed here too ?
##########
datafusion/sql/tests/sql_integration.rs:
##########
@@ -4617,6 +4617,29 @@ fn test_parse_escaped_string_literal_value() {
);
}
+#[test]
+fn test_parse_quoted_column_name_with_at_sign() {
+ let sql = r"SELECT `@column` FROM quoted_column_name_table";
+ let plan = logical_plan(sql).unwrap();
+ assert_snapshot!(
+ plan,
+ @r#"
+ Projection: quoted_column_name_table.@column
+ TableScan: quoted_column_name_table
+ "#
+ );
+
+ let sql = r"SELECT quoted_column_name_table.`@column` FROM
quoted_column_name_table";
+ let plan = logical_plan(sql).unwrap();
+ assert_snapshot!(
+ plan,
+ @r#"
+ Projection: quoted_column_name_table.@column
+ TableScan: quoted_column_name_table
+ "#
+ );
+}
+
Review Comment:
I don't see any similar tests here for unquoted `@variable`. Maybe add some
too ?
--
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]