-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL: Router is not SQL aware #4683
Comments
The calcite-druid JDBC driver hasn't worked for me, so I'm hoping Druid's native SQL HTTP API gives my app a path forward. Is there a workaround for this, perhaps a temporary patch to the query router? If you can point to a starting point, I could try to contribute a fix. |
@randerzander, I take it you're using the Druid Router? (Druid SQL does work fine against the Broker) The changes would need to start in AsyncQueryForwardingServlet. There's a part that assumes any request like |
Hi @gianm, are the docs here out of date? I tried the curl example query but get 405s: curl -XPOST -H'Content-Type: application/json' http://localhost:8082/druid/v2/sql/ -d '{"query":"SELECT COUNT(*) FROM data_source"}'
|
@randerzander You might need to set |
@gianm , thanks for the suggestion! For future reference for others, I followed the docs and configured the druid.sql.* properties in $DRUID_HOME/conf/druid/runtime.properties, but my environment was running using the settings in $DRUID_HOME/conf-quickstart instead which confused things for awhile. |
@randerzander great to hear! |
Fixed by #4851. |
The router redirects
/druid/v2/sql/
to/druid/v2/
and so JSON-over-HTTP SQL queries do not work. I bet something similar applies to the Avatica route at/druid/v2/sql/avatica/
.The router should become aware of SQL. I'm not sure how this will fit in with the router's query-aware routing capabilities, since lacks the SQL metadata infrastructure that the broker uses to plan and understand SQL queries. Maybe the query-aware routing won't apply to SQL at first?
The text was updated successfully, but these errors were encountered: