OpenSearch/x-pack/plugin/sql/qa
Marios Trivyzas 575cafb8da
SQL: Fix serialization of JDBC prep statement date/time params (#56492) (#56579)
The Date/Time related query params of a JDBC prepared statement
serialized using java.util.Date. The rules for serializing
`java.util.Date` objects though reside in
`XContentElasticsearchExtension` which is not available in the
jdbc jar as this class is in `server` module. Therefore, a
custom extension of the `XContentBuilderExtension` iface has been
added to the jdbc module/jar.

Moreover the sql's `qa` project had as dependency the `sql-action`
module which depends on `server` so the `XContentBuilderExtension`
was available for the integ tests hiding the real problem.

Previously, when a user was setting a `java.sql.Time` to the prepStmt,
the DataType used was `DATETIME` instead of `TIME` and therefore
prevented from filtering with a `TIME` casted field:
```
SELECT * FROM test WHERE date::TIME = ?
```

Fixes: #56084
(cherry picked from commit f8d8e971bd2c85fa4aea44b5b3ba0cdcc950a4ed)
2020-05-12 13:25:02 +02:00
..
multi-node SQL: introduce a query builder for the Rest tests (#55094) (#56221) 2020-05-05 18:55:41 +02:00
no-sql Deprecated xpack "enable" settings should be no-ops (#55416) (#56167) 2020-05-05 10:40:49 -04:00
security SQL: introduce a query builder for the Rest tests (#55094) (#56221) 2020-05-05 18:55:41 +02:00
single-node SQL: introduce a query builder for the Rest tests (#55094) (#56221) 2020-05-05 18:55:41 +02:00
src/main SQL: Fix serialization of JDBC prep statement date/time params (#56492) (#56579) 2020-05-12 13:25:02 +02:00
build.gradle SQL: Fix serialization of JDBC prep statement date/time params (#56492) (#56579) 2020-05-12 13:25:02 +02:00