You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2016/08/11 11:56:20 UTC

[jira] [Commented] (IGNITE-3325) .NET: Improve CompiledQuery in LINQ provider

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

Pavel Tupitsyn commented on IGNITE-3325:
----------------------------------------

* CompiledQuery class deprecated
* CompiledQuery2 class added with all the same methods, but taking Expression<Func> instead of raw Func<>. For most use cases the transition will not require code changes.
** Fixes Skip/Take and similar issues
** Allows embedded arguments (specify constant literals directly, e.g. .Where(x < 5))
** Allows using the same argument multiple times
* Compile(IQueryable query) overload added
** Allows any number of arguments
** Allows compiling existing queries (no requirement to provide an expression)
** Allows "query builder" pattern where LINQ expression is constructed step by step

> .NET: Improve CompiledQuery in LINQ provider
> --------------------------------------------
>
>                 Key: IGNITE-3325
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3325
>             Project: Ignite
>          Issue Type: Bug
>          Components: community, platforms
>    Affects Versions: 1.6
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>              Labels: .net
>             Fix For: 1.8
>
>
> User reported that the following code fails with "Error compiling query: all compiled query arguments should come from enclosing delegate parameters."
> {code}
> Func<int,int,int,IQueryCursor<ICacheEntry<int, OrderEntity>>> qry = 
>                 CompiledQuery.Compile((int x, int y,int z) => orderCache.AsCacheQueryable().Where(e => e.Value.OrderId % x == z).Take(y));
> {code}
> Other limitations are:
> * Embedded parameters are not supported
> * Maximum number of parameters is 8
> We should provide additional additional method to compile a delegate which takes an array of args.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)