[ 
https://issues.apache.org/jira/browse/IGNITE-29199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131307#comment-18131307
 ] 

Ignite TC Bot commented on IGNITE-29199:
----------------------------------------

{panel:title=Branch: [pull/13744/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/13744/head] Base: [master] : New Tests 
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Index Query API{color} [[tests 
2|https://ci2.ignite.apache.org/viewLog.html?buildId=9437620]]
* {color:#013220}IndexQueryTestSuite: 
IndexQueryLocalTest.testLocalQueryReturnsDeserializedValues - PASSED{color}
* {color:#013220}IndexQueryTestSuite: 
IndexQueryLocalTest.testLocalQueryKeepBinaryReturnsBinaryValues - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9437721&buildTypeId=IgniteTests24Java8_RunAll]
{color:#ffffff}tcbot-analysis-comment chainBuildId=9437721 
rerunBuildIds=none{color}

> Local IndexQuery returns binary objects on a cache that is not in keep-binary 
> mode
> ----------------------------------------------------------------------------------
>
>                 Key: IGNITE-29199
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29199
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Reza Taroosheh
>            Assignee: Reza Taroosheh
>            Priority: Major
>             Fix For: 2.19
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> A local {{IndexQuery}} ({{setLocal(true)}}) returns keys and values as 
> {{BinaryObject}} on a cache that is not in keep-binary mode. Reading an entry 
> as the cache's own type throws {{ClassCastException}}. The same query without 
> {{setLocal}}, and a local {{ScanQuery}} on the same cache, return the cache's 
> own classes.
> Steps:
> # Create a cache {{IgniteCache<ItemKey, Item>}} with a sorted index on an 
> {{Item}} field, without {{withKeepBinary()}}.
> # Put some entries.
> # Run {{cache.query(new IndexQuery<ItemKey, Item>(Item.class, 
> IDX).setLocal(true)).getAll()}} and read {{getValue()}} as {{Item}}.
> Actual: keys and values are {{BinaryObjectImpl}}, and reading the value as 
> {{Item}} throws {{ClassCastException}}.
> Expected: {{ItemKey}} and {{Item}}, as with the distributed {{IndexQuery}}.
> Reproduced on 2.17.0 and 2.18.0 (reported on the dev list), and on master in 
> {{IndexQueryLimitTest}} with {{setLocal(true)}}.
> Cause: {{IndexQueryProcessor#queryLocal}} unwraps each row with {{keepBinary 
> = true}}. The caller's {{keepBinary}} is used only for the objects passed to 
> the filter. The distributed path deserializes rows in the query future 
> ({{GridCacheQueryFutureAdapter}}), while the local path skips this step.
> Compatibility: fixing this changes the type a local {{IndexQuery}} returns on 
> a cache that is not in keep-binary mode. Code that relies on getting 
> {{BinaryObject}} from it would need to use {{withKeepBinary()}}, which is the 
> documented way to get binary objects.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to