deepthi912 commented on code in PR #13296:
URL: https://github.com/apache/pinot/pull/13296#discussion_r1726333920


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java:
##########
@@ -118,6 +121,23 @@ public List<String> listSchemaNames(@Context HttpHeaders 
headers) {
     return 
_pinotHelixResourceManager.getSchemaNames(headers.getHeaderString(DATABASE));
   }
 
+  @GET
+  @Produces(MediaType.APPLICATION_JSON)
+  @Path("/schemas/info")
+  @Authorize(targetType = TargetType.CLUSTER, action = 
Actions.Cluster.GET_SCHEMA_INFO)
+  @ApiOperation(value = "List all schemas info with count of field specs", 
notes = "Lists all schemas with field "
+      + "count details")
+  public List<SchemaInfo> getSchemaInfo(@Context HttpHeaders headers) {
+    List<SchemaInfo> schemasInfo = new ArrayList<>();
+    TableCache tableCache = _pinotHelixResourceManager.getTableCache();
+    List<Schema> schemaList = tableCache.getSchemas();
+    for (Schema schema : schemaList) {
+      schemasInfo.add(new SchemaInfo(schema.getSchemaName(), 
schema.getDimensionFieldSpecs().size() - 3,

Review Comment:
   Sorry, I mis checked it with _pinotHelixResourceManager instead of 
tableCache. With tableCahe, yes it adds virtual columns in putSchema for each 
schema. Added comment and hid implementation as suggested.



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