Skip to content

[Rust] BUG sbe-tool calculate wrong NULL value for uint64 fields #1025

@wbprime

Description

@wbprime

In PrimitiveValue, SBE uint64 value were represented using long type, leading to NULL value of uint64 (which is 2^64^ -1) output as -1.

This is observed in generated Rust code, and might also exists in other lang generated code.

Example:

 <type name="Fixed16u64" description="Array of 16 u64" length="16" primitiveType="uint64" />

<field name="fixed16u64" id="34" type="Fixed16u64"/>

Will generate something in Rust like:

        /// primitive array field 'fixed16u64'
        /// - min value: 0
        /// - max value: -2
        /// - null value: -1
        /// - characterEncoding: null
        /// - semanticType: null
        /// - encodedOffset: 464
        /// - encodedLength: 128
        /// - version: 0
        #[inline]
        pub fn fixed_16_u64(&mut self, value: &[u64; 16]) {

The generated null value in commets was -1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions