You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/14 02:25:02 UTC

[GitHub] [arrow-datafusion] ReggieFan commented on a diff in pull request #2211: fix: ‘Invalid identifier #xxx’ caused by Case-to-case conversion in SQL

ReggieFan commented on code in PR #2211:
URL: https://github.com/apache/arrow-datafusion/pull/2211#discussion_r850032198


##########
datafusion/core/tests/sql/select.rs:
##########
@@ -1001,3 +1001,41 @@ async fn query_empty_table() {
     let expected = vec!["++", "++"];
     assert_batches_sorted_eq!(expected, &result);
 }
+
+#[tokio::test]
+async fn case_insensitive_in_sql() -> Result<()> {
+    // Test that field name and table name in sql is case-insensitive
+    let fields = vec![
+        Field::new("Column1", DataType::Utf8, true),

Review Comment:
   This PR is to fix the issue #2211 , so i make it case-insensitive to solve it. I think that if we want to keep it case-sensitive, we should solve the problem in another way.
   
   Accroding to the error: No field named 'test.column1'. i think the field name was converted to lower-case and compare to the real filed name. If the real field name contains uppercase letters, it would always fail.



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org