[
https://issues.apache.org/jira/browse/IGNITE-4331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15705926#comment-15705926
]
Alexander Paschenko edited comment on IGNITE-4331 at 11/29/16 5:28 PM:
-----------------------------------------------------------------------
Non working query example:
{code:sql}
SELECT byteArrFld FROM SomeObject WHERE someIntFld > 5
{code}
where {{byteArrFld}} is a field of type {{java.lang.Byte[]}} (array of byte
wrappers).
Again: query will return result, but it will be {{Object[]}}, not {{Byte[]}} as
the user would probably expect. And returned value will be impossible to use as
the value for the same field.
So, this affects DML when you do something like this:
{code:sql}
INSERT INTO SomeObject (_key, byteArrFld) (SELECT _key, byteArrFld FROM
SomeObject WHERE someIntFld > 5)
{code}
This will throw an exception when the code tries to assign {{Byte[]}} field
with {{Object[]}} value.
was (Author: al.psc):
Non working query example:
{code:sql}
SELECT byteArrFld FROM SomeObject WHERE someIntFld > 5
{code}
where {{byteArrFld}} is a field of type {{java.lang.Byte[]}} (array of byte
wrappers).
Again: query will return result, but it will be {{Object[]}}, not {{Byte[]}} as
the user would probably expect. And returned value will be impossible to use as
the value for the same field.
> Binary marshaller does not preserve component type when deserealizing even
> basic array typed fields
> ---------------------------------------------------------------------------------------------------
>
> Key: IGNITE-4331
> URL: https://issues.apache.org/jira/browse/IGNITE-4331
> Project: Ignite
> Issue Type: Sub-task
> Components: binary
> Affects Versions: 1.8
> Reporter: Alexander Paschenko
> Fix For: 2.0
>
>
> How to reproduce: try to deserialize *single* field having type of {{Byte[]}}
> or any other primitive wrapper type array. It will be deserialized as
> {{Object[]}} and won't be suitable even to set the same field's value again -
> metadata check on object building will fail as required ({{Byte[]}}) and
> given ({{Object[]}}) types won't match.
> As agreed with [~vozerov], currently we're not fixing it. Probably will get
> back to this while working on 2.0 release.
> Discovered by [~skozlov] while running SQL DML examples during 1.8 release QA
> process, exact reasons found by [~al.psc].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)