You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Douglas Creager (JIRA)" <ji...@apache.org> on 2010/09/30 23:00:32 UTC

[jira] Created: (AVRO-675) Bytes and fixed setters don't update datum size

Bytes and fixed setters don't update datum size
-----------------------------------------------

                 Key: AVRO-675
                 URL: https://issues.apache.org/jira/browse/AVRO-675
             Project: Avro
          Issue Type: Bug
          Components: c
    Affects Versions: 1.4.0
            Reporter: Douglas Creager


The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:

{{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}

Then later you update that datum to point to a different buffer:

{{avro_wrapbytes_set(datum, "hello", 5);}}

If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918127#action_12918127 ] 

Doug Cutting commented on AVRO-675:
-----------------------------------

Matt/Bruce: can one of you please review this?  Thanks!

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-675:
------------------------------

    Fix Version/s: 1.4.1
     Hadoop Flags: [Reviewed]

FYI, this unfortunately did not make it into 1.4.0, since no one ever marked its "fix version" as 1.4.0 or merged it to that branch.  I'll mark it for 1.5.0 now, but if we decide to make a 1.4.2 release we should include this there.

Committers should always set the "fix-version" when they resolve an issue after committing a patch.  If the fix version is anything but the next major version that will be branched from trunk then they also need to merge the change to the intended release branch.

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>             Fix For: 1.4.1
>
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Douglas Creager updated AVRO-675:
---------------------------------

    Attachment: avro-675.patch

Here's a patch that fixes this, including test cases.  Also visible on my github mirror:

http://github.com/dcreager/avro/tree/avro-675

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-675:
------------------------------

    Fix Version/s:     (was: 1.4.1)
                   1.5.0

Oops.  Actually set fix-version to 1.5.0!

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>            Assignee: Douglas Creager
>             Fix For: 1.5.0
>
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Matt Massie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Massie resolved AVRO-675.
------------------------------

    Resolution: Fixed

Commit to trunk.  Thanks for the patch!

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-675) Bytes and fixed setters don't update datum size

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting reassigned AVRO-675:
---------------------------------

    Assignee: Douglas Creager

> Bytes and fixed setters don't update datum size
> -----------------------------------------------
>
>                 Key: AVRO-675
>                 URL: https://issues.apache.org/jira/browse/AVRO-675
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.4.0
>            Reporter: Douglas Creager
>            Assignee: Douglas Creager
>             Fix For: 1.4.1
>
>         Attachments: avro-675.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The setter methods for bytes and fixed datum instances don't update the size field.  So, for instance, if you create a datum:
> {{avro_datum_t  datum = avro_wrapbytes(NULL, 0);}}
> Then later you update that datum to point to a different buffer:
> {{avro_wrapbytes_set(datum, "hello", 5);}}
> If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.