[
https://issues.apache.org/jira/browse/IGNITE-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847276#comment-15847276
]
Sergey Stronchinskiy edited comment on IGNITE-4425 at 2/2/17 4:39 PM:
----------------------------------------------------------------------
Hi,
After investigating the issue I think the best way to implement
"Array.Contains" is directly translating it to "IN (?,?,....?)" cause:
1. It is the most direct and expected mapping
2. Also there are some possible queries that can not be that easily translated
to "JOIN" clause (for example: .Where(entry => keys.Contains(entry.entry.Key)
|| _SomeBooleanCondition_))
So i would like to implement it that way in conjunction with enabling
"Enumerable.Join" with local collections.
was (Author: gurustron):
Hi,
After investigating the issue I think the best way to implement
"Array.Contains" is directly translating it to "IN (?,?,....?)" cause:
1. It is the most direct and expected mapping
2. Also there are some possible queries that can not be that easily translated
to "JOIN" clause (for example: .Where(entry => keys.Contains(entry.entry.Key)
|| _SomeBooleanCondition_))
So my i would like to implement it that way in conjunction with enabling
"Enumerable.Join" with local collections.
> .NET: Support "ICollection.Contains" in LINQ
> --------------------------------------------
>
> Key: IGNITE-4425
> URL: https://issues.apache.org/jira/browse/IGNITE-4425
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Assignee: Sergey Stronchinskiy
> Labels: .NET, LINQ
> Fix For: 2.0
>
>
> SQL supports IN queries
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p where id in (?, ?)", 1, 3);
> {code}
> Add support in LINQ like this:
> {code}
> persons.AsCacheQueryable().Where(x => new[] {1,3}.Contains(x.Value.Id))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)