You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Renan DelValle (JIRA)" <ji...@apache.org> on 2017/12/13 19:41:00 UTC
[jira] [Commented] (THRIFT-3467) Go Maps for Thrift Sets Should
Have Values of Type struct{}
[ https://issues.apache.org/jira/browse/THRIFT-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289768#comment-16289768 ]
Renan DelValle commented on THRIFT-3467:
----------------------------------------
Hi all,
Sorry for raising this from the dead but just wanted to point out that this change first landed in 0.10.0 instead of 0.11.0.
It took me a while to find out why my bindings broke in so many places when upgrading from 0.9.3 to 0.10.0 so it might be a good idea to update the fix version in this ticket.
> Go Maps for Thrift Sets Should Have Values of Type struct{}
> ------------------------------------------------------------
>
> Key: THRIFT-3467
> URL: https://issues.apache.org/jira/browse/THRIFT-3467
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Compiler
> Affects Versions: 0.9.3
> Reporter: Tom Deering
> Assignee: artem antonenko
> Labels: golang
> Fix For: 0.11.0
>
>
> Sets in Thrift are currently turned into maps with boolean values in Go. Example:
> Thrift
> {code}
> namespace go bug
> service FooService{
> void bar (1:set<string> foos)
> }
> {code}
> Go
> {code}
> func (p *FooServiceClient) Bar(foos map[string]bool) (err error)
> {code}
> Boolean map values waste memory. Map values should be of the zero-byte struct{} type.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)