siddharthteotia commented on a change in pull request #4964: Sql query endpoint
URL: https://github.com/apache/incubator-pinot/pull/4964#discussion_r364859194
 
 

 ##########
 File path: 
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
 ##########
 @@ -67,9 +67,16 @@ public BrokerResponse executeQuery(String brokerAddress, 
String query)
   public Future<BrokerResponse> executePinotQueryAsync(String brokerAddress, 
final Request request) {
     try {
       ObjectNode json = JsonNodeFactory.instance.objectNode();
-      json.put(request.getQueryFormat(), request.getQuery());
-
-      final String url = "http://"; + brokerAddress + "/query";
+      String queryFormat = request.getQueryFormat();
+      json.put(queryFormat, request.getQuery());
+
+      final String url;
+      if (queryFormat.equalsIgnoreCase("sql")) {
 
 Review comment:
   I feel this is not very intuitive as to why the url path has /query for PQL 
query format and /sql for SQL query format. May be both modes can have query 
prefix? I don't think we can change the current url format as that would be 
backward incompatible but for the SQL format, I think we should consider having 
/query/sql

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