soumyakanti3578 commented on code in PR #6727:
URL: https://github.com/apache/hive/pull/6727#discussion_r3897074888


##########
ql/src/test/queries/clientpositive/jdbc_case_sensitive_table_mysql.q:
##########
@@ -0,0 +1,30 @@
+--! qt:database:mysql:qdb:q_test_case_sensitive_country_table.mysql.sql
+
+CREATE EXTERNAL TABLE country_lower (id int, name varchar(20))
+STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
+TBLPROPERTIES (
+    "hive.sql.database.type" = "MYSQL",
+    "hive.sql.jdbc.driver" = "com.mysql.jdbc.Driver",
+    "hive.sql.jdbc.url" = "${system:hive.test.database.qdb.jdbc.url}",
+    "hive.sql.dbcp.username" = 
"${system:hive.test.database.qdb.jdbc.username}",
+    "hive.sql.dbcp.password" = 
"${system:hive.test.database.qdb.jdbc.password}",
+    "hive.sql.table" = "country");
+
+EXPLAIN CBO SELECT COUNT(*) FROM country_lower;
+SELECT COUNT(*) FROM country_lower;
+
+-- The back-tick quoted mixed-case table must resolve to `Country` (2 rows).
+CREATE EXTERNAL TABLE country_mixed (id int, name varchar(20))
+STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
+TBLPROPERTIES (
+    "hive.sql.database.type" = "MYSQL",
+    "hive.sql.jdbc.driver" = "com.mysql.jdbc.Driver",
+    "hive.sql.jdbc.url" = "${system:hive.test.database.qdb.jdbc.url}",
+    "hive.sql.dbcp.username" = 
"${system:hive.test.database.qdb.jdbc.username}",
+    "hive.sql.dbcp.password" = 
"${system:hive.test.database.qdb.jdbc.password}",
+    "hive.sql.table" = "`Country`");
+
+EXPLAIN CBO SELECT COUNT(*) FROM country_mixed;
+SELECT COUNT(*) FROM country_mixed;
+SELECT * FROM country_mixed ORDER BY id;

Review Comment:
   Yes that query is not strictly required so I will remove it from others as 
well.



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

Reply via email to