Copilot commented on code in PR #15944:
URL: https://github.com/apache/pinot/pull/15944#discussion_r2115318491


##########
pinot-controller/src/test/java/org/apache/pinot/controller/api/resources/PinotLogicalTableResourceTest.java:
##########
@@ -459,9 +464,56 @@ public void testGetLogicalTableNames()
       ControllerTest.sendPostRequest(_addLogicalTableUrl, 
logicalTableConfig.toSingleLineJsonString(), getHeaders());
     }
 
-    // verify logical table names
+    // verify logical table names without headers, should return tables 
without database prefix (or default database)

Review Comment:
   [nitpick] Consider expanding this comment to explicitly clarify that the 
default database prefix is stripped when no header is provided, to aid future 
maintainers.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -2367,13 +2367,28 @@ public LogicalTableConfig getLogicalTableConfig(String 
tableName) {
     return ZKMetadataProvider.getLogicalTableConfig(_propertyStore, tableName);
   }
 
+  /**
+   * Returns all logical table names in the cluster regardless of their 
database name.
+   * @return List of logical table names
+   */
   public List<String> getAllLogicalTableNames() {
     List<String> logicalTableNames = _propertyStore.getChildNames(
         
PinotHelixPropertyStoreZnRecordProvider.forLogicalTable(_propertyStore).getRelativePath(),
         AccessOption.PERSISTENT);
     return logicalTableNames != null ? logicalTableNames : 
Collections.emptyList();
   }
 
+  /**
+   * Returns all logical table names in the cluster that belong to the given 
database.
+   * @param databaseName The name of the database
+   * @return List of logical table names that belong to the given database
+   */
+  public List<String> getAllLogicalTableNames(String databaseName) {

Review Comment:
   Consider adding input validation for the databaseName parameter (e.g. 
checking for null or empty values) to ensure robust filtering of logical table 
names.



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