Repository navigation
v0.11.0
This release adds the driver druid, for Apache Druid. No other driver changes for a caller.
New
- Apache Druid. The package
druidruns SQL on Apache Druid throughPOST /druid/v2/sqlon the Router, measured on Druid 36.0.0 and 37.0.0. The DSN isdruid://user:password@host:8888, with the keystls,timezoneandtimeoutand no path (D164). - Read only. The SQL API of Druid refuses
INSERT,UPDATEandDELETE, and runsINSERTandREPLACEonly as tasks that end later. The driver sends no task, so each write fails with the refusal of the server (D163). - Reading. A query reads
arrayLineswith the three rows of the header, one line at a time. An error after some rows ends the answer with HTTP 200 and no text, so an answer that ends with no empty line was cut short. The error then wrapsdbimp.ErrIncompleteanddruid.ErrCut. - Cancel. Druid runs a query on when its client leaves. Each query carries a
sqlQueryId, and the driver sendsDELETE /druid/v2/sql/{id}when the context ends and when the caller closes the rows before the end. - Types. A
DECIMALis afloat64, because the server computes it as a double. A multi-value string with more than one value is a[]any, and a plain string whose text is a JSON array of two or more strings is a[]anytoo. A time is atime.Timein the zone of the keytimezone, a date is adbimp.Date, and anARRAYis a[]any(D164). - Options.
WithTimeout,WithParameterandWithTimeZoneapply to one statement.WithDatabasefails, because Druid has no database to choose.
Tests of Druid
The integration tests of Druid passed on Druid 36.0.0 and 37.0.0 on the machine of the author. In CI, the integration jobs of Druid had not finished when this release was tagged, so no CI run of Druid backs it yet. A push runs the round trip of three types, because each write is a task of the server that takes 5 to 12 seconds, and the run of the schedule, or a manual run, sets DBIMP_FULL and runs every type (D172).
What a caller must know
BeginTxfails withdbimp.ErrNotSupported, because Druid has no transactions.- The ordinary user of
dbmetacannot read the version:GET /statusandsys.serversanswer HTTP 403. - A named argument fails. The server binds each
?as a typed value, from the Go type of the argument, and a[]byteargument fails.
Fixes
- Neo4j, ArangoDB and Druid. When the context of a query ends, Go closes its done channel before it starts the function that sends the cancel. The transport could see the end in that window, and the driver then never stopped the statement on the server. The watch of each driver now sends the stop itself in that case. This fault is in
v0.10.2and earlier for Neo4j and ArangoDB. - Databend tests. A test expected
dbimp.ErrIncompleteafter an error that the server could send before any row. It now expects the wrap only after a row (D107).
Other changes
- Six targets are measured and decided (D162 to D169): Druid, Drill, Solr, Elasticsearch, OpenSearch and DynamoDB. Only Druid has a driver in this release.
- QuestDB and GreptimeDB get no driver, because
usqlreaches each one on a wire protocol that it ships already (D170). The drivers write no DDL (D171). - The workflow pins dbmeta at its release
v0.1.0, and gives-timeout 150mto the integration tests of every driver.