[ 
https://issues.apache.org/jira/browse/CALCITE-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15603499#comment-15603499
 ] 

Francis Chuang commented on CALCITE-1353:
-----------------------------------------

Good point, [~elserj]. Go does have uint64 and int32 types. With the Go driver, 
this change would require a minor update to the client. The code currently 
casts the int32 to a uint64, so if it is set to -1, it overflows to 
18446744073709551615, which should be pretty much  "all" rows. Changing it to 
an int32 would require me to remove the cast from int32 to uint64, but I 
believe it is much better than relying on the overflowing behaviour.

For backwards compatibility, I think the idea of introducing a new field is 
probably the best way forward. In this case, do you have a proposed name for 
the field?

I also think it would be nice to incorporate changes to maxRowCount into this 
(totally missed that!), but again, if we want a new field, we need to decide on 
a suitable name.

> first_frame_max_size in an ExecuteRequest should be an int32 in protobuf 
> definitions.
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1353
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1353
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.8.0
>            Reporter: Francis Chuang
>            Priority: Minor
>             Fix For: avatica-1.10.0
>
>
> In the protobuf definition for {{ExecuteRequest}}, the 
> {{first_frame_max_size}} parameter is typed as an {{uint64}}. See 
> https://github.com/apache/calcite/blob/master/avatica/core/src/main/protobuf/requests.proto#L130.
>  For consistency, it should be an {{int32}}.
> Similar parameters relating to the frame size are all typed as {{int32}}.
> For a {{PrepareAndExecuteRequest}}, {{first_frame_max_size}} is a{{int32}}: 
> https://github.com/apache/calcite/blob/master/avatica/core/src/main/protobuf/requests.proto#L78
> For a {{FetchRequest}}, {{frame_max_size}} is a {{int32}}: 
> https://github.com/apache/calcite/blob/master/avatica/core/src/main/protobuf/requests.proto#L96



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to