kirill-stepanishin opened a new pull request, #3340: URL: https://github.com/apache/tinkerpop/pull/3340
Adds proper Gremlin type suffixes to GremlinLang string generation and fixes precision loss in Long deserialization. ### GremlinLang (`gremlin-lang.ts`) - Integers in Int32 range → bare (`42`), beyond Int32 → `L` suffix (`3000000000L`) - Floats → `D` suffix (`3.14D`) - `bigint` → `N` suffix (`5N`), previously unhandled - Large integers in scientific notation fall back to `D` ### Long deserialization (`LongSerializer.js`) - Values outside `MIN_SAFE_INTEGER`-`MAX_SAFE_INTEGER` now return `BigInt` instead of a precision-losing `Number` via `parseFloat()` ### NumberSerializationStrategy fix - Replaced broken Int64 range check (used Number literals beyond safe range, silently rounded) with correct `MIN_SAFE_INTEGER..MAX_SAFE_INTEGER` bounds ### Test updates - Updated 3 existing GremlinLang expectations to reflect `D` suffix on floats - Added tests for `bigint`, Int32 boundaries, safe integer boundaries, and float suffix - `max-long`/`min-long` model values changed from imprecise `Number` to exact `BigInt` - `min-long` moved from byte-exact (`run`) to object-level (`runWriteRead`) — previously passed only because precision loss was symmetrical in both directions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
