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


##########
ql/src/test/queries/clientpositive/jdbc_case_sensitive_postgres.q:
##########
@@ -0,0 +1,76 @@
+--! qt:database:postgres:qdb:q_test_case_sensitive.postgres.sql
+
+-- ==============================================================
+-- Test with AUTHORIZATION ENABLED
+-- ==============================================================
+
+set hive.test.authz.sstd.hs2.mode=true;
+set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest;
+set hive.security.authorization.enabled=true;
+
+-- Test Case-Sensitive Schema and Table
+-- This CREATE will pass, but the SELECT will fail authorization.
+CREATE EXTERNAL TABLE country_test (id int, name varchar(20))
+STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
+TBLPROPERTIES (
+    "hive.sql.database.type" = "POSTGRES",
+    "hive.sql.jdbc.driver" = "org.postgresql.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.schema" = "\"WorldData\"",
+    "hive.sql.table" = "\"Country\""
+);
+SELECT * FROM country_test;
+
+
+-- Test Case-Sensitive Partition Column
+-- This CREATE will pass, but the SELECT will fail authorization.
+CREATE EXTERNAL TABLE cities_test (id int, name varchar(20), regionid int)
+STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
+TBLPROPERTIES (
+    "hive.sql.database.type" = "POSTGRES",
+    "hive.sql.jdbc.driver" = "org.postgresql.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.schema" = "\"WorldData\"",
+    "hive.sql.table" = "\"Cities\"",
+    "hive.sql.partitionColumn" = "RegionID",
+    "hive.sql.numPartitions" = "2"
+);
+SELECT * FROM cities_test where regionid >= 20;
+
+
+-- Test Case-Sensitive Query Field Names
+-- (Should fail in SerDe/Iterator with Column not found)

Review Comment:
   I think the comments are incorrect/from an earlier version. I will remove 
these 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]

Reply via email to