calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <>
Subject Re: Does avatica support a date type?
Date Wed, 06 Apr 2016 14:37:38 GMT
Also, if you have suggestions on how you'd like to see the documentation 
expanded, please do provide them. I can try to expand, but if I don't 
have a focus on what is actually lacking, it's hard to be effective.

Josh Elser wrote:
> 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
>> I need to set a Type for each value. I noticed that the list of Reps
>> here
>> (
>> 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!

View raw message