-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
refactor(plugins): BigNumber Time Comparison with existing time_offset API #27718
refactor(plugins): BigNumber Time Comparison with existing time_offset API #27718
Conversation
e3584b0
to
5542188
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27718 +/- ##
==========================================
- Coverage 69.77% 69.73% -0.05%
==========================================
Files 1911 1922 +11
Lines 75056 75273 +217
Branches 8362 8434 +72
==========================================
+ Hits 52374 52493 +119
- Misses 20630 20717 +87
- Partials 2052 2063 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/testenv up |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://54.184.250.188:8080. Credentials are |
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://35.166.80.185:8080. Credentials are |
5542188
to
61d9923
Compare
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://35.167.243.15:8080. Credentials are |
61d9923
to
f044f96
Compare
c82df11
to
32ea355
Compare
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.221.145.242:8080. Credentials are |
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.215.133.163:8080. Credentials are |
4c4cfe0
to
82b639f
Compare
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true |
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://54.245.212.136:8080. Credentials are |
cherry picked from d3d3b31
- When calling the time range method ensure we pass an array so we can remove the array check and follow the method signature
cherry picked from c1f73ab
- Remove time grain from time_comparison controls
- Support textual columns in time_offsets comparisons - Because textual columns have no time grain nor they use xaxis labels all the time, the time_grain and xaxis are not required for the comparison queries that use textual columns only cherry picked from 5819e3a
- Support time comparison with no columns, meaning we want to compare just metrics. If so, we do an outer join
- Do not pass a column because it's not required anymore
- Use the new getTimeOffset to render the correct time range in the tooltip - Update the lock file with moment
- Process data when custom or inherit offset is used - Handle responses from time_range api that don't include the comparison ranges
- Add tests for the new getTimeOffset method - Hide label if no comparison is being made
- Update lock file so we remove moment - Stop displaying Calculation Type since this viz only uses Actual Values (postporocessing: []) - Handle nullish dttm
- Add new prop so we can show full list of choices or just a reduced amount based on the boolean value - Update the copy so it better reflects and help the user
- Add migration to port from old time comparison params to new approach - Add tests for migration file
- Fix delta calculation for shifts - Add tests for new changes
- Fix lint error - Fix tests
- Pass a config object instead of raw bollean flags to the time comparison control so the intention is clear when using it - Split getTimeOffset tests so parseDttmToDate has its own file - use inlined test instead of blocks with describe and it
- Fix how we separate the time_grain scenario with join keys - Simplify when we raise time grain required exception
ee5b4c7
to
85a7494
Compare
Ephemeral environment shutdown and build artifacts deleted. |
…t API (apache#27718) Co-authored-by: lilykuang <jialikuang@gmail.com> Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
…t API (apache#27718) Co-authored-by: lilykuang <jialikuang@gmail.com> Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
SUMMARY
Previously we implemented the time comparison in BigNumber viz using some new custom properties in the queryObject to compute the offsets. We are moving away from that approach in order to be more consistent with the way Superset handles time comparison in other visualizations.
Some of the changes of this PR are:
There will be a follow up PR cleaning up the customizations from previous approach, that clean up is left out of this PR to ease the review process.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION