ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4817) .NET: Contains fails in LINQ when subquery comes from a variable
Date Wed, 05 Apr 2017 20:23:41 GMT

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

ASF GitHub Bot commented on IGNITE-4817:
----------------------------------------

GitHub user gurustron opened a pull request:

    https://github.com/apache/ignite/pull/1745

    IGNITE-4817

    QueryParser switched to use CompoundExpressionTreeProcessor.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gurustron/ignite IGNITE-4817

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/1745.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1745
    
----
commit 488e67e7be7970e1373f3e23f34563e3a8a46bd3
Author: gurustron <gurustronpublic@gmail.com>
Date:   2017-04-05T20:11:48Z

    IGNITE-4817: Query Parser uses CompoundExpressionTreeProcessor, small fixes, tests

----


> .NET: Contains fails in LINQ when subquery comes from a variable
> ----------------------------------------------------------------
>
>                 Key: IGNITE-4817
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4817
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 1.9
>            Reporter: Pavel Tupitsyn
>            Assignee: Sergey Stronchinskiy
>            Priority: Minor
>              Labels: .NET, LINQ
>             Fix For: 2.0
>
>
> Using Contains with subquery works when subquery is inline:
> {code}
> var res = personsQry.Where(x => orgsQry.Where(o => o.Value.Size < 100000).Select(o
=> o.Key).Contains(x.Value.OrgId));
> {code}
> And fails when extracted into a variable:
> {code}
> var orgIds = orgsQry.Where(o => o.Value.Size < 100000).Select(o => o.Key);
> 		
> var res = personsQry.Where(x => orgIds.Contains(x.Value.OrgId));
> {code}
> Exception:
> {code}
> Failed to parse query: select _T0._key, _T0._val from "persons-linq".Person as _T0 where
(_T0.OrgId IN (select _T1._key, _T1._val from "orgs-linq".Organization as _T1 ))
> Caused by: org.h2.jdbc.JdbcSQLException: Subquery is not a single column query
> {code}
> This can be reproduced in {{CacheLinqTest.TestContains}} by extracting a variable:
> {code}
> var foo = orgCache
>   .Where(orgEntry => orgEntry.Value.Name == "Org_1")
>   .Select(orgEntry => orgEntry.Key);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message