You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When specifying a value for a field of type "long" that falls within the 32-bit integer range (like 2147483647), the generator raises an exception because it appears to expect values that don’t overlap with the 32-bit integer representation. Oddly, values that exceed the 32-bit integer range (such as 2147483648) work as expected, suggesting an issue with how values are parsed or type-checked within the generator.
Exception Details
The generator throws the following exception when specifying 2147483647:
Exception in thread "main" java.lang.RuntimeException: Invalid option for record schema: type org.apache.avro.generic.GenericData$Record, value '{"a": "exemple", "b": 2147483647}'
In contrast, values outside the 32-bit integer range, like 2147483648, do not trigger this error.
The text was updated successfully, but these errors were encountered:
JeremieBergeron
changed the title
Exception for long field when value is can be represented with a integer
Exception for long field when value can be represented with a integer
Oct 29, 2024
When specifying a value for a field of type
"long"
that falls within the 32-bit integer range (like2147483647
), the generator raises an exception because it appears to expect values that don’t overlap with the 32-bit integer representation. Oddly, values that exceed the 32-bit integer range (such as2147483648
) work as expected, suggesting an issue with how values are parsed or type-checked within the generator.Exception Details
The generator throws the following exception when specifying
2147483647
:In contrast, values outside the 32-bit integer range, like
2147483648
, do not trigger this error.Example JSON Schema
Here’s the schema that causes the exception:
However, if we use
2147483648
for"b"
, it works correctly.Tested version: confluentinc/avro-random-generator@1a87c97
The text was updated successfully, but these errors were encountered: