Skip to content

Compilation errors when specifying large Repeating Groups #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RichardWarburton opened this issue Nov 1, 2018 · 0 comments
Closed

Compilation errors when specifying large Repeating Groups #609

RichardWarburton opened this issue Nov 1, 2018 · 0 comments

Comments

@RichardWarburton
Copy link
Contributor

RichardWarburton commented Nov 1, 2018

If you want to encode repeating groups larger than a uint16 then you need to specify an increase in the size of the block length property:

<composite name="groupSizeEncoding" description="Repeating group dimensions" >
    <type name="blockLength" primitiveType="uint32"/>
    <type name="numInGroup" primitiveType="uint16" semanticType="NumInGroup"/>
</composite>

But if you do this then SBE will generate Java code with a compilation error in:

RedactedDecoder.java:121: error: incompatible types: possible lossy conversion from long to int
            blockLength = dimensions.blockLength();

I can understand if you don't wish to support block lengths larger than a uint16 but I think doing this with SBE validation rather than generated invalid Java code would be a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants