Add support for dynamic objects in Aggregate and Group by fields #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that
dynamic
values cannot be used for the summarize function (used for the Aggregate and Group by fields). For aggregating, I am converting the value to along
since its goal is to be used with a mathematical function. For grouping I am converting the value to a string. Note that the goal of this is not to support all the possible use cases but to at least give valid syntax:Aggregate example:
![Screenshot from 2022-06-01 11-18-41](https://user-images.githubusercontent.com/4025665/171372105-5edc7b6c-8194-4015-b5ab-899c81895785.png)
Group by example:
![Screenshot from 2022-06-01 11-19-07](https://user-images.githubusercontent.com/4025665/171372085-49e99460-c679-4772-b8d0-69315dc0b2b8.png)
I tried to do some unit test for this but it seems that the current components are not working with the react testing library (clicking on the "+" button didn't render the selector). I could do some e2e test for covering this functionality but it doesn't seem worth it. Let me know what you think.