Jackie-Jiang commented on code in PR #13296:
URL: https://github.com/apache/pinot/pull/13296#discussion_r1725967876
##########
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:
Interesting.. Did you find when the virtual columns are missing? In
`TableCache.putSchema()`, virtual columns are always first added before adding
to the cache
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]