Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UriParser - Aggregation method Average doesn't support Int16 #3165

Open
davidKolar175 opened this issue Jan 17, 2025 · 4 comments · May be fixed by #3168
Open

UriParser - Aggregation method Average doesn't support Int16 #3165

davidKolar175 opened this issue Jan 17, 2025 · 4 comments · May be fixed by #3168
Labels

Comments

@davidKolar175
Copy link

davidKolar175 commented Jan 17, 2025

Hello,

when working with ODataUriParser instance I've ran into an exception when an aggregation function average does not support attribute of the type Int16 (or Byte for that matter). The exception comes from the file ApplyBinder.cs. In my eyes this is incorrect behavior. If you decide that this is indeed a bug and not desired behaviour then I can provide my capacity to fix this issue.

Example query: $apply=aggregate(Short with average as AverageLength)

Short attribute must be of type Int16 in edm model.

Thank you for response!

@gathogojr
Copy link
Contributor

Thank you @davidKolar175 for reporting this issue. This is most likely an oversight and therefore a bug. Since you already identified where the problem is, we'd welcome a pull request contribution if you're in a position to.

@davidKolar175
Copy link
Author

Hello @gathogojr, the pullrequest has been created. You can review it here. :) #3168

@corranrogue9
Copy link
Contributor

@davidKolar175 can you confirm that you're intending to use this with the odata client and not on the service side of your implementation? There are additional changes needed if we are going to expose this in AspNetCoreOData.

@davidKolar175
Copy link
Author

@corranrogue9 Not quite sure what do you mean by that question. Our use case is quite unique I would say, we use OData for our new minimal API project and since there is no native compatibility yet we try to only pick certain functionalities that would take too long to implement. ODataUriParser is one of the functionalities where we use it to help us create ODataFeature instance. And from that point we don't realz use anything from Odata nuget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants