Re: Does avatica support a date type?

2016-04-07 Thread F21
Awesome! Thanks for the link to TypedValue.java, it was extremely useful :) I've also assigned the JIRA to you :) On 8/04/2016 12:26 AM, Josh Elser wrote: Yep, unix timestamp in the `number_value` attribute should be correct. If you have more questions about how to serialize TypedValue's

Re: Does avatica support a date type?

2016-04-07 Thread Julian Hyde
Unix timestamps are implicitly UTC. Avatica (and standard SQL) timestamps have no time zone. Sorry to be pedantic. I know I’ve said it before, and I know it’s just semantics. Until someone starts writing code to do timezone shifts. Julian > On Apr 7, 2016, at 7:26 AM, Josh Elser

Re: Does avatica support a date type?

2016-04-07 Thread Josh Elser
Yep, unix timestamp in the `number_value` attribute should be correct. If you have more questions about how to serialize TypedValue's before I get some more docs in place, this method[1] should help. This was a recent consolidation which should be pretty easy to follow (even without knowing

Re: Does avatica support a date type?

2016-04-06 Thread F21
@ Josh I just created CALCITE-1192 but was unable to assign someone to it, so you might have to assign yourself. Thanks again! On 7/04/2016 8:36 AM, Josh Elser wrote: Ok. You got me thinking that it would be good to document how each support type in TypedValue is serialized into that message

Re: Does avatica support a date type?

2016-04-06 Thread F21
Sure thing! In the mean time, can you answer my question regarding whether setting the type to JAVA_SQL_TIMESTAMP and setting number_value to the unix timestamp is correct? On 7/04/2016 8:36 AM, Josh Elser wrote: Ok. You got me thinking that it would be good to document how each support type

Re: Does avatica support a date type?

2016-04-06 Thread Josh Elser
Ok. You got me thinking that it would be good to document how each support type in TypedValue is serialized into that message (as it isn't necessarily obvious how the code expects it). Want to file a JIRA issue and assign it to me? F21 wrote: Hey Josh, That was a great explanation, thanks!

Re: Does avatica support a date type?

2016-04-06 Thread F21
Hey Josh, That was a great explanation, thanks! And yes, I am using protobufs. :) So in the case of a date time, should I set the Rep to JAVA_SQL_TIMESTAMP and set the number_value field to the unix timestamp equivalent of the datetime? I am not familiar with Java, but it would also be nice

Re: Does avatica support a date type?

2016-04-06 Thread Josh Elser
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