317brian commented on code in PR #15515:
URL: https://github.com/apache/druid/pull/15515#discussion_r1419808520
##########
docs/api-reference/sql-api.md:
##########
@@ -51,20 +51,30 @@ Each query has an associated SQL query ID. You can set this
ID manually using th
The request body takes the following properties:
* `query`: SQL query string.
+
* `resultFormat`: String that indicates the format to return query results.
Select one of the following formats:
- * `object`: Returns a JSON array of JSON objects with the HTTP header
`Content-Type: application/json`.
- * `array`: Returns a JSON array of JSON arrays with the HTTP header
`Content-Type: application/json`.
- * `objectLines`: Returns newline-delimited JSON objects with a trailing
blank line. Returns the HTTP header `Content-Type: text/plain`.
- * `arrayLines`: Returns newline-delimited JSON arrays with a trailing blank
line. Returns the HTTP header `Content-Type: text/plain`.
- * `csv`: Returns a comma-separated values with one row per line and a
trailing blank line. Returns the HTTP header `Content-Type: text/csv`.
+ * `object`: Returns a JSON array of JSON objects with the HTTP response
header `Content-Type: application/json`.
+ * `array`: Returns a JSON array of JSON arrays with the HTTP response header
`Content-Type: application/json`.
+ * `objectLines`: Returns newline-delimited JSON objects with a trailing
blank line. Returns the HTTP response header `Content-Type: text/plain`.
+ * `arrayLines`: Returns newline-delimited JSON arrays with a trailing blank
line. Returns the HTTP response header `Content-Type: text/plain`.
+ * `csv`: Returns a comma-separated values with one row per line and a
trailing blank line. Returns the HTTP response header `Content-Type: text/csv`.
+
* `header`: Boolean value that determines whether to return information on
column names. When set to `true`, Druid returns the column names as the first
row of the results. To also get information on the column types, set
`typesHeader` or `sqlTypesHeader` to `true`. For a comparative overview of data
formats and configurations for the header, see the [Query output
format](#query-output-format) table.
+
* `typesHeader`: Adds Druid runtime type information in the header. Requires
`header` to be set to `true`. Complex types, like sketches, will be reported as
`COMPLEX<typeName>` if a particular complex type name is known for that field,
or as `COMPLEX` if the particular type name is unknown or mixed.
+
* `sqlTypesHeader`: Adds SQL type information in the header. Requires `header`
to be set to `true`.
+
+ For compatibility, Druid returns the HTTP header
`X-Druid-SQL-Header-Included: yes`, when all of the following conditions are
met:
Review Comment:
```suggestion
For compatibility, Druid returns the HTTP header
`X-Druid-SQL-Header-Included: yes` when all of the following conditions are met:
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]