ngsg commented on code in PR #5793:
URL: https://github.com/apache/hive/pull/5793#discussion_r2300177079


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -1984,14 +1984,28 @@ private StringBuilder 
appendSimpleCondition(StringBuilder builder,
 
   private StringBuilder appendCondition(StringBuilder builder,
       String fieldName, String[] elements, boolean pattern, List<String> 
parameters) {
+    return appendCondition(builder, fieldName, elements, pattern, parameters, 
false);
+  }
+
+  private StringBuilder appendPatternConditionCaseSensitive(StringBuilder 
builder,
+      String fieldName, String elements, List<String> parameters) {
+    elements = normalizeIdentifier(elements);
+    return appendCondition(builder, fieldName, elements.split("\\|"), true, 
parameters, true);

Review Comment:
   Hi @jiihye, thanks for working on this. From the discussion above and 
@deniskuzZ's 
[suggestion](https://github.com/apache/hive/pull/5793#discussion_r2186220265), 
I think we need to unify the two `appendPatternCondition` methods so that 
`element` is consistently lowercased by `normalizeIdentifier`. Without that, 
Hive loses its current case-insensitive behavior, as demonstrated by the 
following test failure:
   ```
   $ mvn test -Drat.skip -pl standalone-metastore/metastore-server 
-Dtest.groups= -Dtest=TestDatabases#testGetDatabasesCaseInsensitive
   
   [ERROR] Failures:
   [ERROR]   TestDatabases.testGetDatabasesCaseInsensitive:466 Found databases 
size expected:<2> but was:<0>
   [ERROR]   TestDatabases.testGetDatabasesCaseInsensitive:466 Found databases 
size expected:<2> but was:<0>
   [INFO]
   [ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0
   ```
   
   cf. You may check the full list of failed tests by clicking the 
[continuous-integration/jenkins/pr-head](http://ci.hive.apache.org/job/hive-precommit/job/PR-5793/7/display/redirect),
 which can be found at the bottom of this page.



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to