You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2017/03/14 09:03:41 UTC

[jira] [Created] (IGNITE-4817) .NET: Contains fails in LINQ when subquery comes from a variable

Pavel Tupitsyn created IGNITE-4817:
--------------------------------------

             Summary: .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
             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 ))
{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)