deepthi912 commented on code in PR #13296: URL: https://github.com/apache/pinot/pull/13296#discussion_r1725765497
########## 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: So, I noticed that some schemas don't have these virtual columns added. So adding logic to check specifically for each of the virtual column in a schema. -- 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