You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/01/06 18:43:35 UTC
[GitHub] [incubator-pinot] npawar opened a new issue #4962: Create a new
query endpoint for sql
npawar opened a new issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962
Add a new endpoint to the pinot broker, which will be the sql query endpoint. Adding a new endpoint will make it easier for migration from pql to sql.
The sql endpoint will fix the query type to sql, the response format to sql, and the group by mode to sql. There will be no scope for configuring these.
The pql endpoint will continue to support options responseFormat=sql and groupByMode=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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] mayankshriv commented on issue #4962: Create a
new query endpoint for sql
Posted by GitBox <gi...@apache.org>.
mayankshriv commented on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-571703610
+1
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar closed issue #4962: Create a new query
endpoint for sql
Posted by GitBox <gi...@apache.org>.
npawar closed issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar edited a comment on issue #4962: Create a
new query endpoint for sql
Posted by GitBox <gi...@apache.org>.
npawar edited a comment on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-571272652
Existing endpoints are:
1. /query
GET
```
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("query")
public String processQueryGet(
@ApiParam(value = "Query", required = true) @QueryParam("bql") String query,
@ApiParam(value = "Trace enabled") @QueryParam(TRACE) String traceEnabled,
@ApiParam(value = "Debug options") @QueryParam(DEBUG_OPTIONS) String debugOptions) {
```
This is a strictly PQL endpoint. A JsonNode is created in this method, which sets the query into a "pql" fieldname. There's no scope yet to add any query options, which is necessary for sql
2. /query
POST
```
@POST
@Path("query")
public String processQueryPost(String payload) {
```
This endpoint takes a payload. As a result, this one works for pql as well as sql. This one also lets you set the query options for pql.
We have 2 options to take it from here to introduce the sql endpoint
1. Add a completely new set of endpoints for `/sql`
a) For the GET, this means creating the JsonNode correctly with `sql`, and setting all the sql options
b) For the POST, this means validating the payload has `sql`. Adding the sql query options to the payload.
2. Modify existing endpoints to be able to handle both modes
a) For the GET, this means adding a new query param, to indicate this is a sql/pql query, and then accordingly creating the JsonNode
b) For the POST, this means checking the payload for sql/pql, and then adding the sql query options if sql.
I like option 1. It lets us keep pql and sql as obviously separate endpoints, and make the coding clean, avoiding a lot of if else.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar commented on issue #4962: Create a new
query endpoint for sql
Posted by GitBox <gi...@apache.org>.
npawar commented on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-571272652
Existing endpoints are:
1. /query
GET
```
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("query")
public String processQueryGet(
@ApiParam(value = "Query", required = true) @QueryParam("bql") String query,
@ApiParam(value = "Trace enabled") @QueryParam(TRACE) String traceEnabled,
@ApiParam(value = "Debug options") @QueryParam(DEBUG_OPTIONS) String debugOptions) {
```
This is a strictly PQL endpoint. A JsonNode is created in this method, which sets the query into a "pql" fieldname. There's no scope yet to add any query options, which is necessary for sql
2. /query
POST
```
@POST
@Path("query")
public String processQueryPost(String payload) {
```
This endpoint takes a payload. As a result, this one works for pql as well as sql. This one also lets you set the query options for pql.
We have 2 options to take it from here to introduce the sql endpoint
1. Add a completely new set of endpoints for "/sql"
a) For the GET, this means creating the JsonNode correctly with "sql", and setting all the sql options
b) For the POST, this means validating the payload has "sql". Adding the sql query options to the payload.
2. Modify existing endpoints to be able to handle both modes
a) For the GET, this means adding a new query param, to indicate this is a sql/pql query, and then accordingly creating the JsonNode
b) For the POST, this means checking the payload for sql/pql, and then adding the sql query options if sql.
I like option 1. It lets us keep pql and sql as obviously separate endpoints, and make the coding clean, avoiding a lot of if else.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar commented on issue #4962: Create a new
query endpoint for sql
Posted by GitBox <gi...@apache.org>.
npawar commented on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-571349043
> +1 to adding a new endpoint.
> Should pql endpoint still support responseFormat and groupByMode of sql? Why?
responseFormat, maybe not. But groupByMode, I think it should. If we don't support that, no one can use `order by` unless they are on sql. It might take users long before they get to sql endpoint, or until it's even ready.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] mcvsubbu commented on issue #4962: Create a new
query endpoint for sql
Posted by GitBox <gi...@apache.org>.
mcvsubbu commented on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-571310841
+1 to adding a new endpoint.
Should pql endpoint still support responseFormat and groupByMode of sql? Why?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar commented on issue #4962: Create a new
query endpoint for sql
Posted by GitBox <gi...@apache.org>.
npawar commented on issue #4962: Create a new query endpoint for sql
URL: https://github.com/apache/incubator-pinot/issues/4962#issuecomment-572689948
Based on recent comments from @siddharthteotia in PR #4964, considering changing this to `/query/sql` instead of just `/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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org