ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-4543) .NET: Support multiple aggregates in LINQ
Date Tue, 04 Jul 2017 15:58:01 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Tupitsyn updated IGNITE-4543:
-----------------------------------
    Fix Version/s:     (was: 2.1)

> .NET: Support multiple aggregates in LINQ
> -----------------------------------------
>
>                 Key: IGNITE-4543
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4543
>             Project: Ignite
>          Issue Type: Improvement
>          Components: platforms
>            Reporter: Pavel Tupitsyn
>              Labels: .NET, linq
>
> Provide a way to express multiple aggregates in LINQ like we do in SQL:
> {{SELECT MIN(salary), MAX(salary) from Employee}},
> LINQ to SQL and EntityFramework allow constructs like these:
> {code}
>         [Test]
>         public void TestAggregatesMultiple()
>         {
>             var ints = GetPersonCache().AsCacheQueryable().Select(x => x.Key);
>             var res = ints.GroupBy(x => 1).Select(g => new {Sum = g.Sum(), Avg
= g.Average()}).Single();
>             Assert.AreEqual(ints.Sum(), res.Sum);
>             Assert.AreEqual(ints.Average(), res.Avg);
>             var res2 = ints.Select(x => new {Sum = ints.Sum(), Avg = ints.Average()}).First();
>             
>             Assert.AreEqual(ints.Sum(), res2.Sum);
>             Assert.AreEqual(ints.Average(), res2.Avg);
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message