calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Does avatica support a date type?
Date Wed, 06 Apr 2016 14:03:00 GMT
If you're using Protobuf (as I think you are), you don't need to worry 
about the conversion from the Protobuf TypedValue message back into the 
Avatica class TypedValue. This is handled implicitly by Avatica itself. 
Just make sure that the Rep you provide matches the serialization.

I'm not familiar with golang's SQL interface, so I'm not sure what they 
define as a "datetime" here. If you have more specifics, I can try to 
point you in the right direction.

AFAIK, there isn't any difference in implementation between 
PRIMITIVE_FOO and FOO (there are a few variants of this).

The difference between Long and BigInteger would be the resulting Java 
type created for the value (a Long or a BigInteger). Sorry if this is 
cyclic logic :)

Yes, the JAVA_* types are used to support the array of 
date/time/datetime data types.

F21 wrote:
> I need to send some TypedValues to the avatica server (phoenix query
> server) when executing a statement.
>
> According to
> https://calcite.apache.org/docs/avatica_protobuf_reference.html#typedvalue,
> I need to set a Type for each value. I noticed that the list of Reps
> here
> (https://calcite.apache.org/docs/avatica_protobuf_reference.html#rep)
> support things like JAVA_SQL_TIME, JAVA_SQL_TIMESTAMP etc, however it's
> unclear which ones are valid values for a TypedValue.
>
> In my case, the golang sql interface provides data for parameter binding
> that might be a time.time (which is essentially a datetime). In this
> case, what should my TypedValue look like?
>
> Also, I noticed the Rep enum has a few things that looked similar, but
> might mean different things. It would be nice to have documentation to
> clarify. For example:
> - What's the difference between PRIMITIVE_BOOLEAN and BOOLEAN?
> - Is there any difference between LONG and BIG_INTEGER?
> - Are the JAVA_SQL_* and JAVA_UTIL_* types currently being used?
>
> Thanks!
>
>

Mime
View raw message