[ https://issues.apache.org/jira/browse/IGNITE-4926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Stronchinskiy reassigned IGNITE-4926: -------------------------------------------- Assignee: Sergey Stronchinskiy > .NET: Join fails in LINQ when subquery is using Select clause > ------------------------------------------------------------- > > Key: IGNITE-4926 > URL: https://issues.apache.org/jira/browse/IGNITE-4926 > Project: Ignite > Issue Type: Bug > Components: platforms > Reporter: Sergey Stronchinskiy > Assignee: Sergey Stronchinskiy > Priority: Minor > Labels: .NET, LINQ > Fix For: 2.1 > > > Using {{Join}} with subquery works when subquery does not contain {{Select}} > clause: > {code} > var persons = GetPersonCache().AsCacheQueryable().Where(x => x.Key >= 0); > var orgs = GetOrgCache().AsCacheQueryable().Where(x => x.Key > 10); > var res = persons.Join(orgs, > p => p.Value.OrganizationId, > o => o.Value.Id, (p, o) => p) > .Where(x => x.Key >= 0) > .ToList(); > {code} > And fails when subquery is using {{Select}}: > {code} > var res = persons > .Join( > orgs.Where(orgEntry => orgEntry.Value.Name == "Org_1") > .Select(orgEntry => orgEntry.Key), > e => e.Value.OrganizationId, > i => i, > (e, i) => e) > .ToList(); > {code} > Exception: > {code} > Failed to parse SQL query: select _T0._key, _T0._val from "".Person as _T0 > inner join (select _T1._key from "".Organization as _T1 where (_T1._key > ?) > and (_T1.Name = ?) ) as _T2 on (_T2._key, _T2._val = _T0.OrganizationId) > where (_T0._key >= ?) > Caused by: org.h2.jdbc.JdbcSQLException: Column "_T2._VAL" not found; > {code} > This can be reproduced in {{CacheLinqTest.TestSubqueryJoin}} by adding next: > {code} > var foo = persons > .Join( > orgs.Where(orgEntry => orgEntry.Value.Name == "Org_1") > .Select(orgEntry => orgEntry.Key), > e => e.Value.OrganizationId, > i => i, > (e, i) => e) > .ToArray(); > {code} > or > {code} > var foo = orgs > .Where(orgEntry => orgEntry.Value.Name == "Org_1") > .Select(orgEntry => orgEntry.Key); > var bar = persons > .Join(foo, e => e.Value.OrganizationId, i => i, (e, i) => e) > .ToArray(); > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)