Alexandr Shapkin created IGNITE-11984:
-----------------------------------------

             Summary: .NET CompiledQuery won't work with strings
                 Key: IGNITE-11984
                 URL: https://issues.apache.org/jira/browse/IGNITE-11984
             Project: Ignite
          Issue Type: Improvement
          Components: platforms
    Affects Versions: 2.7.5
            Reporter: Alexandr Shapkin


Consider two samples:

var cache = GetClientCache<Person>();
 var persons = cache.AsCacheQueryable();

 

This works:

var qry = CompiledQuery.Compile((int id) => persons.Where(x => x.Value.Id == 
id));

 

This won't:

var qry = CompiledQuery.Compile((string id) => persons.Where(x => 
x.Value.Name.Equals(id)));

 

Error compiling query: entire LINQ expression should be specified within lambda 
passed to Compile method.

 

Reason: 

GetCompiledQuery method -> var paramValues becomes null

Because of that CacheQueryExpressionVisitor -> VisitConstant will not be 
executed

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to