-
Notifications
You must be signed in to change notification settings - Fork 9
Timechart refactoring #490
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
base: main
Are you sure you want to change the base?
Conversation
|
Check the possibility of using |
…nst, refactored Span parameter parsing
|
Refactored the Transformation class to be immutable with span and divByInst variables using the ContextValue object. Refactored parsing span quite a lot as it was heavily dependent on utility functions. Created new objects, SpanParameter and TimeRange, because of it. AggregateFunctions are still mutable as it's impossible to make it immutable without grammar changes to the renaming of the columns first and there's an open PR about that in PTH-03: # 94 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new objects introduced could use some unit tests, otherwise looks good
Created unit tests for SpanParameter and TimeRange. The contextValue classes are very hard to test because of the ANTLR parse trees involved. The ANTLR parsing is covered by the translation tests anyways, so I think creating tests for just the two objects is sufficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests are missing an essential test that the timechart works end to end as-in the dataset is aggregated properly. please add one.
Fixes #473 .
Refactored TimechartStep:
Reworked TimechartTest:
Refactored TimechartTransformation: