mayankshriv commented on a change in pull request #4519: Add support sql query
http api
URL: https://github.com/apache/incubator-pinot/pull/4519#discussion_r313892894
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
##########
@@ -66,8 +72,31 @@
@Inject
AccessControlFactory _accessControlFactory;
+ @POST
+ @Path("queryByFormat")
+ public String postQuery(String requestJsonStr, @Context HttpHeaders
httpHeaders) {
+ try {
+ JsonNode requestJson = JsonUtils.stringToJsonNode(requestJsonStr);
+ String query = requestJson.get("query").asText();
+ String traceEnabled = "false";
+ if (requestJson.has("trace")) {
Review comment:
Minor nit: This can be a one-liner like:
`String traceEnabled = (requestJson.has("trace")) ? .... : false;`
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]