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_r313891824
 
 

 ##########
 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();
 
 Review comment:
   Use a CommonConstant or static final instead of "query".
   Please do so for all other such hardcoded strings in this PR (e.g. 
"traceEnabled", "queryFormat" etc).

----------------------------------------------------------------
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]

Reply via email to