Aklakan commented on issue #3404:
URL: https://github.com/apache/jena/issues/3404#issuecomment-3236843453

   It turns out that the NodeId for decimal "18" uses a different internal ID 
than for "18.0". 
   On retrieval, TDB2 exposes `0x00000000000012` as `18.0` which however maps 
to the internal id `0x010000000000B4`.
   So the failure to roundtrip decimals seems to be a minor TDB2 issue after 
all - decimals without comma should be exposed as such.
   
   ```java
           
System.out.println(NodeId.inline(NodeValue.makeDecimal("18").asNode()));    // 
0x00000000000012
           
System.out.println(NodeId.inline(NodeValue.makeDecimal("18.").asNode()));   // 
0x00000000000012
           
System.out.println(NodeId.inline(NodeValue.makeDecimal("18.0").asNode()));  // 
0x010000000000B4
           
System.out.println(NodeId.inline(NodeValue.makeDecimal("18.00").asNode())); // 
0x02000000000708
   ```
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to