Timechart refactoring#490
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 |
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.
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: