[
https://issues.apache.org/jira/browse/AVRO-1182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568955#comment-13568955
]
Daniel Russel commented on AVRO-1182:
-------------------------------------
* It appears that your editor inserts hard-tabs. We use 4 spaces instead of
tabs so that the code looks the same in all editors and in patches.
The only tabs I see are in jsonschemas/circulardep, which is not a file I
touched.
* A few styling issues. E.g space after '{' or before '}' in single-line
functions or space before and after binary operators. (If it is hard to fix,
don't bother. I'll have it fixed before we check in).
Took a pass through and fixed what I found.
* Since you are using int64_t for sizeBytes() and blockOffsetBytes() in may be
prudent to use the same (instead of size_t) for seekBlockBytes() as well,
especially since it refers to the offset from the beginning of the file.
OK. Changed.
* The documentation for remainingBytes() in stream.hh is somewhat ambiguous.
Since the zero-copy streams don't have a file pointer, it has a range of bytes
in the exposed buffer, you want to specify if remainingBytes() is the number of
bytes remaining from the beginning or end of the exposed buffer. I prefer it to
refer from the end of the exposed buffer.
I added some clarification to point out that it should be commensurate with the
byteCount() function results.
* sync_match can be made a bit faster if we replace indexes with pointers.
Not sure what you had in mind. I updated the sync_match function, which removed
a couple of ops.
> DataFileReader missing seek, sync methods
> -----------------------------------------
>
> Key: AVRO-1182
> URL: https://issues.apache.org/jira/browse/AVRO-1182
> Project: Avro
> Issue Type: Improvement
> Components: c++
> Affects Versions: 1.7.3
> Reporter: Daniel Russel
> Attachments: add_seek
>
>
> The DataFileReader is missing the seek and sync methods that are found in the
> java version making it hard to navigate a file except in a linear fashion.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira