You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Queries like:
$apply=aggregate(FavoriteNumber with sum as Total)/compute(Total mul 2 as DoubleTotal)&$orderby=DoubleTotal asc
$apply=aggregate(FavoriteNumber with sum as Total)/compute(Total mul 2 as DoubleTotal1)/compute(DoubleTotal1 mul 2 as DoubleTotal2)"
fail with DoubleTotal(1) property not found
Assemblies affected
7.5+
Reproduce steps
[Fact]
public void AggregatedAndComputePropertiesTreatedAsOpenPropertyInOrderBy()
{
var odataQueryOptionParser = new ODataQueryOptionParser(HardCodedTestModel.TestModel,
HardCodedTestModel.GetPersonType(), HardCodedTestModel.GetPeopleSet(),
new Dictionary<string, string>()
{
{"$orderby", "DoubleTotal asc, Total desc"},
{"$apply", "aggregate(FavoriteNumber with sum as Total)/compute(Total mul 2 as DoubleTotal)"}
});
odataQueryOptionParser.ParseApply();
var orderByClause = odataQueryOptionParser.ParseOrderBy();
orderByClause.Direction.Should().Be(OrderByDirection.Ascending);
orderByClause.Expression.ShouldBeSingleValueOpenPropertyAccessQueryNode("DoubleTotal");
orderByClause = orderByClause.ThenBy;
orderByClause.Direction.Should().Be(OrderByDirection.Descending);
orderByClause.Expression.ShouldBeSingleValueOpenPropertyAccessQueryNode("Total");
}
Expected result
Test should pass
Actual result
Test fails with property not found exception.
The text was updated successfully, but these errors were encountered:
Queries like:
$apply=aggregate(FavoriteNumber with sum as Total)/compute(Total mul 2 as DoubleTotal)&$orderby=DoubleTotal asc
$apply=aggregate(FavoriteNumber with sum as Total)/compute(Total mul 2 as DoubleTotal1)/compute(DoubleTotal1 mul 2 as DoubleTotal2)"
fail with DoubleTotal(1) property not found
Assemblies affected
7.5+
Reproduce steps
Expected result
Test should pass
Actual result
Test fails with property not found exception.
The text was updated successfully, but these errors were encountered: