You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2017/02/01 13:00:54 UTC
[jira] [Updated] (THRIFT-3190) In perl, a thrift set<> type should
use a more proper native implementation
[ https://issues.apache.org/jira/browse/THRIFT-3190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King, III updated THRIFT-3190:
---------------------------------------
Description:
Currently a set<> type in Thrift equates to a hash where the value of each type is set to 1. The keys are interpreted as strings and therefore lose their ordering. The TestClient for cpp sends:
The TestServer for perl (which I am writing to verify SSL server refactoring) receives:
$thing HASH(0x35da228)={ -1 => '1', -2 => '1', 0 => '1', 1 => '1', 2 => '1' }
Note how -1 and -2 are transposed. Further, there are no set manipulations available.
Recommend the use of Set::Scalar as a required perl dependency for proper set operations.
The old behavior could be preserved through a compiler flag for perl ensuring that existing products that rely on the current implementation don't have to change.
was:
Currently a set<> type in Thrift equates to a hash where the value of each type is set to 1. The keys are interpreted as strings and therefore lose their ordering. The TestClient for cpp sends:
The TestServer for perl (which I am writing to verify SSL server refactoring) receives:
$thing HASH(0x35da228)={ -1 => '1', -2 => '1', 0 => '1', 1 => '1', 2 => '1' }
Note how -1 and -2 are transposed. Further, there are no set manipulations available.
Recommend the use of Set::Scalar as a required perl dependency for proper set operation. This would be a breaking change but necessary to achieve proper set semantics and operations from the native thrift type.
> In perl, a thrift set<> type should use a more proper native implementation
> ---------------------------------------------------------------------------
>
> Key: THRIFT-3190
> URL: https://issues.apache.org/jira/browse/THRIFT-3190
> Project: Thrift
> Issue Type: Improvement
> Components: Perl - Library
> Affects Versions: 0.9.2
> Reporter: James E. King, III
> Assignee: James E. King, III
> Priority: Minor
>
> Currently a set<> type in Thrift equates to a hash where the value of each type is set to 1. The keys are interpreted as strings and therefore lose their ordering. The TestClient for cpp sends:
> The TestServer for perl (which I am writing to verify SSL server refactoring) receives:
> $thing HASH(0x35da228)={ -1 => '1', -2 => '1', 0 => '1', 1 => '1', 2 => '1' }
> Note how -1 and -2 are transposed. Further, there are no set manipulations available.
> Recommend the use of Set::Scalar as a required perl dependency for proper set operations.
> The old behavior could be preserved through a compiler flag for perl ensuring that existing products that rely on the current implementation don't have to change.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)