JingsongLi commented on code in PR #402:
URL: https://github.com/apache/flink-table-store/pull/402#discussion_r1033456655


##########
flink-table-store-hive/flink-table-store-hive-catalog/src/test/java/org/apache/flink/table/store/hive/HiveCatalogITCase.java:
##########
@@ -317,6 +319,29 @@ public void testHiveLock() throws InterruptedException {
         assertThat(count.get()).isEqualTo(100);
     }
 
+    @Test
+    public void testHiveTableLowerCase() throws Exception {
+        // create table
+        tEnv.executeSql("CREATE TABLE T ( A INT, b STRING ) WITH ( 
'file.format' = 'avro' )")

Review Comment:
   Actually, Flink SQL is case insensitive for table name too. We can add two 
cases:
   ```
       @Test
       public void testTableNameCaseInsensitive() throws Exception {
           // create table
           tEnv.executeSql("CREATE TABLE T ( a INT, b STRING ) WITH ( 
'file.format' = 'avro' )")
                   .await();
           tEnv.executeSql("SELECT a, b FROM T").print();
           tEnv.executeSql("SELECT a, b FROM t").print();
           assertThat(hiveShell.executeQuery("SELECT * FROM 
t").size()).isEqualTo(0);
           assertThat(hiveShell.executeQuery("SELECT * FROM 
T").size()).isEqualTo(0);
       }
   ```



##########
flink-table-store-hive/flink-table-store-hive-catalog/src/test/java/org/apache/flink/table/store/hive/HiveCatalogITCase.java:
##########
@@ -317,6 +319,29 @@ public void testHiveLock() throws InterruptedException {
         assertThat(count.get()).isEqualTo(100);
     }
 
+    @Test
+    public void testHiveTableLowerCase() throws Exception {
+        // create table
+        tEnv.executeSql("CREATE TABLE T ( A INT, b STRING ) WITH ( 
'file.format' = 'avro' )")

Review Comment:
   Actually, Flink SQL is case insensitive for table name too. We can add case:
   ```
       @Test
       public void testTableNameCaseInsensitive() throws Exception {
           // create table
           tEnv.executeSql("CREATE TABLE T ( a INT, b STRING ) WITH ( 
'file.format' = 'avro' )")
                   .await();
           tEnv.executeSql("SELECT a, b FROM T").print();
           tEnv.executeSql("SELECT a, b FROM t").print();
           assertThat(hiveShell.executeQuery("SELECT * FROM 
t").size()).isEqualTo(0);
           assertThat(hiveShell.executeQuery("SELECT * FROM 
T").size()).isEqualTo(0);
       }
   ```



-- 
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]

Reply via email to