icefury71 commented on a change in pull request #6620: URL: https://github.com/apache/incubator-pinot/pull/6620#discussion_r585126880
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java ########## @@ -420,9 +422,32 @@ public String checkTableConfig(String tableConfigStr) { String msg = String.format("Invalid table config json string: %s", tableConfigStr); throw new ControllerApplicationException(LOGGER, msg, Response.Status.BAD_REQUEST, e); } + return validateConfig(tableConfig, _pinotHelixResourceManager.getSchemaForTableConfig(tableConfig)); + } + + @POST + @Path("/tables/validateTableAndSchema") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Validate table config for a table along with specified schema", notes = + "Validate given table config and schema. If specified schema is null, attempt to retrieve schema using the " + + "table name. This API returns the table config that matches the one you get from 'GET /tables/{tableName}'." Review comment: It does add an extra layer (set TableType - REALTIME/OFFLINE). So in effect, it does return a structure compatible with the GET api. This is similar to the original validate API ---------------------------------------------------------------- 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. 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