Hi Pavel,

Thank you for the response. Regarding support every LINQ expression, I agree
with you. It's not possible.

Let me show an example. The following LINQ query:

/var result = queryable.GroupBy(e => e.Value.ContractId).Select(group => new
{
    ContractId = group.Key,
    Id = group.OrderByDescending(entry => entry.Value.Version).First().Key
}).OrderBy(g => g.Count).ToList();/

we can replace by SQL query:

/SELECT cid as ContractId,
       min(id) as Id
FROM
  (SELECT t2.cid,
          t3.id
   FROM
     (SELECT t1.ContractId AS cid, max(t1.Version) AS ver
      FROM table AS t1
      GROUP BY t1.ContractId) AS t2
   JOIN table AS t3 ON t3.Version = t2.ver
   AND t3.ContractId = t2.cid)
GROUP BY cid/

I know this is not a trivial task and it can not be implemented easily. I
just curious if there any plans to support that in the near future.

Thanks again.

Best Regards,
Roman



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Reply via email to