[ 
https://issues.apache.org/jira/browse/IGNITE-22325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Evgeny Stanilovsky updated IGNITE-22325:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> BinaryTupleBuilder accepts LocalDate/LocalDateTime that can not be 
> represented by BinaryTuple
> ---------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-22325
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22325
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> For both LocalDate and LocalDateTime BinaryTuple format 
> (https://cwiki.apache.org/confluence/display/IGNITE/IEP-54%3A+Schema-first+Approach)
>  can only store year as 14 value bits + 1 sign bit.
> {code:java}
> @Test
> public void dateTest2() {
>     LocalDate value = LocalDate.of(2000000, 1, 1);
>     BinaryTupleBuilder builder = new BinaryTupleBuilder(1);
>     ByteBuffer bytes = builder.appendDate(value).build();
>     assertEquals(3, bytes.get(1));
>     assertEquals(5, bytes.limit());
>     BinaryTupleReader reader = new BinaryTupleReader(1, bytes);
>     assertEquals(value, reader.dateValue(0));
> }
> org.opentest4j.AssertionFailedError: 
> Expected :+2000000-01-01
> Actual   :1152-01-01
> {code}
> It should be possible to store values that do not lie within a range defined 
> by BinaryTuple format.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to