After some debugging it turns out the issue is in the integration between
Apache Drill and the SQL4ES JDBC driver, which doesn't implement the
getDate(int, java.util.calendar) method (it's a stub that returns null).

I have submitted an issue to the maintainer of SQL4ES, but I do wonder why
does Drill need to pass a Calendar object when calling getDate? What does
it expect to receive?

Dan

On 12 September 2016 at 18:04, Dan Markhasin <minimi...@gmail.com> wrote:

> Hi all,
>
> I'm using Drill to query ElasticSearch using the sql4es driver (
> https://github.com/Anchormen/sql4es) and I've run into an issue where
> Drill returns NULL values for Date columns:
>
> 0: jdbc:drill:zk=local> select Date_01 from 
> ES23.`data-generator-poc-async`.arm
> where Date_01 IS NOT NULL limit 1;
> +----------+
> | Date_01  |
> +----------+
> | null     |
> +----------+
>
> The DESCRIBE command returns the correct data type (DATE).
>
> Using other JDBC clients (Squirrel / WorkbenchJ) I am able to run the
> exact same query on the exact source, and get the correct data (which is in
> the form of 2016-03-21, for example).
>
> Any idea why it's returning null?
>

Reply via email to