clintropolis opened a new pull request #6974: sql support for dynamic parameters URL: https://github.com/apache/incubator-druid/pull/6974 This PR adds support for parameterized SQL queries of the form: ``` SELECT COUNT(*) FROM data_source WHERE foo = ? AND __time > ? ``` Over the HTTP API : ```json { "query" : "SELECT COUNT(*) FROM data_source WHERE foo = ? AND __time > ?", "parameters": [ { "ordinal": 1, "type": "VARCHAR", "value": "bar"}, { "ordinal": 2, "type": "TIMESTAMP", "value": "2000-01-01 00:00:00" } ] } ``` JDBC: ``` PreparedStatement statement = connection.prepareStatement("SELECT COUNT(*) AS cnt FROM druid.foo WHERE dim1 = ? OR dim1 = ?"); statement.setString(1, "abc"); statement.setString(2, "def"); final ResultSet resultSet = statement.executeQuery(query); ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org