odata.net icon indicating copy to clipboard operation
odata.net copied to clipboard

Multiple Compute throws $apply/groupby grouping expression 'amount_sum' must evaluate to a property access value

Open rbalagangadharan opened this issue 1 month ago • 0 comments

Describe the bug

When I use multiple compute, parser throws error $apply/groupby grouping expression 'amount_sum' must evaluate to a property access value on parser.ParseApply();

odata query:

$top=100&$select=name,year,amount_sum,salary_sum,uniq_category,result_1,result_2,result_3&$apply=filter(salary ne 0)/groupby((name,year),aggregate(amount with sum as amount_sum, salary with sum as salary_sum, category with countdistinct as uniq_category))/compute(salary_sum div uniq_category as result_1)/compute(result_1 mul 0.365 as result_2)/compute(amount_sum div result_2 as result_3)&$orderby=amount_sum desc

$top=100&$select=name,year,amount_sum,salary_sum,uniq_category,result_1,result_2,result_3&$apply=filter(salary ne 0)/groupby((name,year),aggregate(amount with sum as amount_sum, salary with sum as salary_sum, category with countdistinct as uniq_category))/compute(salary_sum mul 0.05 as result_1)/compute(salary_sum add result_1 as result_2)

Assemblies affected

Which assemblies and versions are known to be affected e.g. Microsoft.OData.Core 8.4.3

Steps to Reproduce

The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.

Expected behaviour

It should not throw any error

Actual behaviour

throwing error $apply/groupby grouping expression 'amount_sum' must evaluate to a property access value

rbalagangadharan avatar Nov 20 '25 09:11 rbalagangadharan