-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix: fix extra insert for count on dataset creation #24625
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24625 +/- ##
==========================================
+ Coverage 68.97% 69.07% +0.10%
==========================================
Files 1907 1907
Lines 74153 74152 -1
Branches 8182 8182
==========================================
+ Hits 51148 51224 +76
+ Misses 20882 20805 -77
Partials 2123 2123
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -52,7 +52,7 @@ def _prophet_fit_and_predict( # pylint: disable=too-many-arguments | |||
Fit a prophet model and return a DataFrame with predicted results. | |||
""" | |||
try: | |||
# pylint: disable=import-error,import-outside-toplevel | |||
# pylint: disable=import-outside-toplevel |
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.
Thank you for fixing this warning.
@@ -47,9 +46,7 @@ def run(self) -> Model: | |||
# Creates SqlaTable (Dataset) | |||
dataset = DatasetDAO.create(self._properties, commit=False) | |||
|
|||
# Updates columns and metrics from the dataset | |||
dataset.metrics = [SqlMetric(metric_name="COUNT(*)", expression="COUNT(*)")] |
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.
@hughhhh would you mind linking to where this COUNT(*)
metric is being created?
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.
dataset.fetch_metadata
calls database.get_metrics
🏷️ preset:2023.27 |
(cherry picked from commit e6e8276)
(cherry picked from commit e6e8276)
SUMMARY
Removing additional count() metric save, when .fetch_metadata() actually handles that work 😅
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION