Open acautin opened 6 years ago
@acautin
In https://github.com/K2InformaticsGmbH/erloci/blob/480fe1388ee377e5be869155945762637f6dd3ad/src/oci_util.erl#L287 and https://github.com/K2InformaticsGmbH/erloci/blob/480fe1388ee377e5be869155945762637f6dd3ad/src/oci_util.erl#L295 ...is it giving you correct result if you replace Ns:4/little-unsigned-integer-unit:8
with Ns:4/big-unsigned-integer-unit:8
👍 for find it!
Also need to update this test case with better verification for correctness of API https://github.com/K2InformaticsGmbH/erloci/blob/480fe1388ee377e5be869155945762637f6dd3ad/test/erloci_test.erl#L963-L966 Currently API correctness isn't checked.
For the fractional part (Which was what I was interested at the moment) yes it gives me the correct results if I use big
there. For now I am using only the datetime conversion taking the first 7 bytes and adding the fraction (if there is any) myself. We can replace it later when this is fixed. https://github.com/K2InformaticsGmbH/dderl/blob/master/src/dderloci_utils.erl#L142-L146
Hi I am seeing wrong results when using oci_util:from_dts/1 function for the fractional part. The problem seems to be matching using little endian instead of big when decoding the value.
Also #5 doesn't seem to be correct as I can read the data in binary format.