[GitHub] [incubator-pinot] fx19880617 commented on a change in pull request #4994: Make sql as default query format.

2020-01-22 Thread GitBox
fx19880617 commented on a change in pull request #4994: Make sql as default 
query format.
URL: https://github.com/apache/incubator-pinot/pull/4994#discussion_r369839823
 
 

 ##
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
 ##
 @@ -143,9 +172,20 @@ public String getQueryResponse(String pqlQuery, String 
traceEnabled, String quer
 }
 String hostNameWithPrefix = instanceConfig.getHostName();
 String url =
-"http://; + 
hostNameWithPrefix.substring(hostNameWithPrefix.indexOf("_") + 1) + ":" + 
instanceConfig.getPort()
-+ "/query";
-return sendPQLRaw(url, pqlQuery, traceEnabled, queryOptions);
+
getQueryURL(hostNameWithPrefix.substring(hostNameWithPrefix.indexOf("_") + 1), 
instanceConfig.getPort(),
+querySyntax);
+return sendQueryRaw(url, query, traceEnabled);
+  }
+
+  private String getQueryURL(String hostName, String port, String querySyntax) 
{
+switch (querySyntax) {
+  case CommonConstants.Broker.Request.SQL:
+return String.format("http://%s:%s/query/sql;, hostName, port);
 
 Review comment:
   Current approach is to route SQL query from ui still to PQL endpoint, but 
with query options `groupByMode=sql;responseFormat=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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org



[GitHub] [incubator-pinot] fx19880617 commented on a change in pull request #4994: Make sql as default query format.

2020-01-20 Thread GitBox
fx19880617 commented on a change in pull request #4994: Make sql as default 
query format.
URL: https://github.com/apache/incubator-pinot/pull/4994#discussion_r368786402
 
 

 ##
 File path: pinot-controller/src/main/resources/static/js/init.js
 ##
 @@ -67,13 +67,13 @@ $(document).ready(function() {
 // execute query and draw the results
 var query = EDITOR.getValue().trim();
 var traceEnabled = document.getElementById('trace-enabled').checked;
-var groupByModeSQL = document.getElementById('group-by-mode-sql').checked;
-var responseFormatSQL = 
document.getElementById('response-format-sql').checked;
+var groupByModePQL = document.getElementById('group-by-mode-pql').checked;
+var responseFormatPQL = 
document.getElementById('response-format-pql').checked;
 var queryOptions = undefined;
-if (groupByModeSQL === true) {
+if (groupByModePQL !== true) {
   queryOptions = "groupByMode=sql";
 }
-if (responseFormatSQL === true) {
+if (responseFormatPQL !== true) {
   if (queryOptions === undefined) {
 
 Review comment:
   Provides a `/sql` endpoint now.


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


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org



[GitHub] [incubator-pinot] fx19880617 commented on a change in pull request #4994: Make sql as default query format.

2020-01-17 Thread GitBox
fx19880617 commented on a change in pull request #4994: Make sql as default 
query format.
URL: https://github.com/apache/incubator-pinot/pull/4994#discussion_r368186639
 
 

 ##
 File path: pinot-controller/src/main/resources/static/query/index.html
 ##
 @@ -79,11 +79,11 @@ Pinot Data Explorer
   
 Tracing
   
-  
 
 Review comment:
   changed the ui to only show one check box of pql, which means to use pql 
syntax if checked.


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


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org