shounakmk219 commented on code in PR #12417:
URL: https://github.com/apache/pinot/pull/12417#discussion_r1503667801


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1660,10 +1640,25 @@ static String getActualColumnName(String rawTableName, 
String columnName, @Nulla
       return columnName;
     }
     String columnNameToCheck;
-    if (columnName.regionMatches(ignoreCase, 0, rawTableName, 0, 
rawTableName.length())
-        && columnName.length() > rawTableName.length() && 
columnName.charAt(rawTableName.length()) == '.') {
-      columnNameToCheck = ignoreCase ? 
columnName.substring(rawTableName.length() + 1).toLowerCase()
-          : columnName.substring(rawTableName.length() + 1);
+    String resolvedColumnName = columnName;
+    if (rawTableName.contains(".")) { // table name has database prefix
+      String databaseName = rawTableName.split("\\.")[0];

Review Comment:
   As for the sanity check, the actual database name or logical table name will 
not have '.' as that's ensured during table creation by 
`TableConfigUtils.validateTableName`.
   But I get your point for the column name with '.' case. Will update the 
condition logic for `if column name only has table prefix` case.
   Nice catch!



-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to