-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Expression is missing an 'as' clause #403
Comments
Hello @Huangzc88 , Thank you for reporting, We will look if there is something we can do with your scenario. Best Regards, Jon Performance Libraries Runtime Evaluation |
@Huangzc88 var groupList = list.AsQueryable().GroupBy("new (ItemCode as ItemCode, Flag as Flag)"); does not throw any exception. Is the result what you expect? |
Hello @Huangzc88 , Starting from the v1.2.1, the alias will automatically be added when a single property/string constant is used like in your scenario. So writing Best Regards, Jon |
@StefH |
Thank you for your answer, thank you for solving this problem so quickly, I will retest. |
Hello @JonathanMagnan I've retested it and it's really working, and thank you very much for your quick resolution of the issue.
MyDynamicClass is inherited from DynamicClass, throw excption :“No applicable aggregate method 'Sum(Object)' exists”,it seems that Qty is treated as an object type and does not automatically identify as an int type.
Can we optimize here? Thank you so much. |
Hello @Huangzc88 , Thank you, we will try it and fix it if we can. |
Hello @Huangzc88 , Sorry for the delay, My developer tried it but didn't succeed to reproduce it. Do you think you could provide him a full runnable example with the case? That will help him to get started and try to fix it. |
Hello @JonathanMagnan Thank you for your reply. Below is all the code that can be executed directly to the console program.:
|
Hello @Huangzc88 , Unfortunately, we looked at it and I don't think we will support it at this moment. The So for now, the |
With version 1.2.23 I'm getting this error |
When I execute the code above, it throw an exception with message: 'Expression is missing an 'as' clause'.
Also, if I switch to dynamic types, i have the same problem.
When I use a single field to group, the results sorted by dynamic types don't feel right, and the dictionary types come out as expected.
The text was updated successfully, but these errors were encountered: