You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2012/05/11 22:55:48 UTC

[jira] [Updated] (AVRO-1053) PHP long is treated inconsistently between decoding and encoding when using gmp

     [ https://issues.apache.org/jira/browse/AVRO-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-1053:
-------------------------------

    Attachment: AVRO-1053.patch

Here's a version of the patch that memoizes the max and min values, as is done in other cases with gmp constants.

This works for me and existing tests pass.

Eric, can you add a test that fails without this change?
                
> PHP long is treated inconsistently between decoding and encoding when using gmp
> -------------------------------------------------------------------------------
>
>                 Key: AVRO-1053
>                 URL: https://issues.apache.org/jira/browse/AVRO-1053
>             Project: Avro
>          Issue Type: Bug
>          Components: php
>    Affects Versions: 1.6.3
>         Environment: 32-bit apache using gmp 
>            Reporter: Eric
>         Attachments: AVRO-1053.patch, patch.txt
>
>
> A record containing a long value decoded by avro using gmp cannot be re-encoded.  It fails validation because read_long returns a string value when using gmp and on encode is_valid_datum() for long requires an int value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira