Oleg Bevz created IGNITE-14523:
----------------------------------
Summary: Support for string.Compare method in Apache Ignite LINQ
provider
Key: IGNITE-14523
URL: https://issues.apache.org/jira/browse/IGNITE-14523
Project: Ignite
Issue Type: New Feature
Components: thin client
Affects Versions: 2.9.1
Reporter: Oleg Bevz
Fix For: 2.9.1
Hello, current Apache Ignite does not support string comparison in LINQ
provider (Apache.Ignite.Linq project).
For example following modified query
insideThinClientQueryExample.ScanQueryExample method will throw Exception:
var employees = cache.AsCacheQueryable().Select(x => x.Value).Where(x =>
string.Compare(x.Name, "Daniel Adams") >= 0);
Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException System.Object
InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.NotSupportedException: Method not
supported: System.String.(Int32 Compare(System.String, System.String))
at
Apache.Ignite.Linq.Impl.MethodVisitor.VisitMethodCall(MethodCallExpression
expression, CacheQueryExpressionVisitor visitor)
at
Apache.Ignite.Linq.Impl.CacheQueryExpressionVisitor.VisitMethodCall(MethodCallExpression
expression)
at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression
expression)
at
Apache.Ignite.Linq.Impl.CacheQueryExpressionVisitor.VisitBinary(BinaryExpression
expression)
at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression
expression)
at
Apache.Ignite.Linq.Impl.CacheQueryExpressionVisitor.VisitBinary(BinaryExpression
expression)
at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression
expression)
at
Apache.Ignite.Linq.Impl.CacheQueryModelVisitor.VisitWhereClause(WhereClause
whereClause, Int32 index, Boolean hasGroups)
at
Apache.Ignite.Linq.Impl.CacheQueryModelVisitor.ProcessGroupings(QueryModel
queryModel)
at
Apache.Ignite.Linq.Impl.CacheQueryModelVisitor.VisitBodyClauses(ObservableCollection`1
bodyClauses, QueryModel queryModel)
at Remotion.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel)
at Apache.Ignite.Linq.Impl.CacheQueryModelVisitor.VisitQueryModel(QueryModel
queryModel, Boolean includeAllFields, Boolean copyAliases)
at Apache.Ignite.Linq.Impl.CacheQueryModelVisitor.GenerateQuery(QueryModel
queryModel)
at
Apache.Ignite.Linq.Impl.CacheFieldsQueryExecutor.ExecuteCollection[T](QueryModel
queryModel)
at
Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo.ExecuteQueryModel(QueryModel
queryModel, IQueryExecutor executor)
at
Apache.Ignite.Linq.Impl.CacheFieldsQueryProvider.Execute[TResult](Expression
expression)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)