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 2017/04/06 12:50:41 UTC
[jira] [Updated] (IGNITE-4543) .NET: Support multiple aggregates in
LINQ
[ 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.0)
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
> Fix For: 2.1
>
>
> 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.3.15#6346)