Skip to content
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

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Jul 7, 2023

SUMMARY

Removing additional count() metric save, when .fetch_metadata() actually handles that work 😅

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #24625 (9264ecf) into master (c53b249) will increase coverage by 0.10%.
The diff coverage is n/a.

❗ Current head 9264ecf differs from pull request most recent head e42625c. Consider uploading reports for the commit e42625c to get more accurate results

@@            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              
Flag Coverage Δ
hive 54.14% <ø> (?)
mysql 79.47% <ø> (?)
postgres 79.56% <ø> (-0.01%) ⬇️
presto 54.04% <ø> (+<0.01%) ⬆️
python 83.54% <ø> (+0.21%) ⬆️
sqlite 78.12% <ø> (-0.01%) ⬇️
unit 54.83% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/datasets/commands/create.py 100.00% <ø> (ø)

... 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
Copy link
Member

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(*)")]
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hughhhh hughhhh merged commit e6e8276 into apache:master Jul 10, 2023
@hughhhh hughhhh deleted the rm-extra-count-save branch July 10, 2023 16:55
@sadpandajoe
Copy link
Member

🏷️ preset:2023.27

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Jul 10, 2023
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 11, 2023
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants