npawar commented on a change in pull request #6620:
URL: https://github.com/apache/incubator-pinot/pull/6620#discussion_r584933678
##########
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:
`This API returns the table config that matches the one you get from
'GET /tables/{tableName}'` - this isn't the case rt? This API returns the same
table config that was passed as argument?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]