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

chore: Default to engine specification regarding using wildcard #27843

Conversation

john-bodley
Copy link
Member

SUMMARY

The BaseEngineSpec.select_star method provides an option (with a default) with regards to whether or not one should use a wildcard (show_cols=False) or enumerate the columns (show_cols=True) when generating a SQL statement for fetching sample records from a dataset.

Some of the underlying engines—Hive, Presto, BigQuery—override this method including the default for the show_cols function argument. When creating the SQL statement rather than forcing show_cols=True we should instead fallback to the engine specific preference.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI.

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

@github-actions github-actions bot added the api Related to the REST API label Apr 1, 2024
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 59.99%. Comparing base (5e8459b) to head (1a52e52).
Report is 100 commits behind head on master.

Files Patch % Lines
superset/databases/api.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #27843      +/-   ##
==========================================
- Coverage   67.46%   59.99%   -7.48%     
==========================================
  Files        1910     1912       +2     
  Lines       74802    75019     +217     
  Branches     8345     8345              
==========================================
- Hits        50467    45007    -5460     
- Misses      22284    27961    +5677     
  Partials     2051     2051              
Flag Coverage Δ
hive 48.93% <0.00%> (?)
mysql ?
postgres ?
presto 53.63% <0.00%> (?)
python 62.76% <0.00%> (-15.51%) ⬇️
sqlite ?
unit 56.78% <0.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@john-bodley john-bodley force-pushed the john-bodley--select-star-wildcard-use-engine-default branch from 695c636 to e40cb90 Compare April 1, 2024 21:37
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Apr 1, 2024
@john-bodley john-bodley force-pushed the john-bodley--select-star-wildcard-use-engine-default branch from e40cb90 to 1a52e52 Compare April 1, 2024 22:03
@john-bodley john-bodley closed this Apr 2, 2024
@john-bodley john-bodley reopened this Apr 3, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 59.99%. Comparing base (5e8459b) to head (1a52e52).
Report is 114 commits behind head on master.

Files Patch % Lines
superset/databases/api.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #27843      +/-   ##
==========================================
- Coverage   67.46%   59.99%   -7.48%     
==========================================
  Files        1910     1912       +2     
  Lines       74802    75019     +217     
  Branches     8345     8345              
==========================================
- Hits        50467    45007    -5460     
- Misses      22284    27961    +5677     
  Partials     2051     2051              
Flag Coverage Δ
hive 48.93% <0.00%> (?)
mysql ?
postgres ?
presto 53.63% <0.00%> (?)
python 62.76% <0.00%> (-15.51%) ⬇️
sqlite ?
unit 56.78% <0.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@john-bodley john-bodley force-pushed the john-bodley--select-star-wildcard-use-engine-default branch from 1a52e52 to 518dd95 Compare April 3, 2024 00:38
@pull-request-size pull-request-size bot added size/XS and removed size/S labels Apr 3, 2024
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

👍🏼

@john-bodley john-bodley force-pushed the john-bodley--select-star-wildcard-use-engine-default branch from 518dd95 to 21fa5f3 Compare April 3, 2024 02:03
Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Nice. Thanks for fixing this @john-bodley.

@john-bodley john-bodley force-pushed the john-bodley--select-star-wildcard-use-engine-default branch from 21fa5f3 to 7a8b929 Compare April 3, 2024 15:07
@john-bodley john-bodley merged commit 30bc8f0 into apache:master Apr 3, 2024
40 checks passed
@john-bodley john-bodley deleted the john-bodley--select-star-wildcard-use-engine-default branch April 3, 2024 16:09
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request Apr 4, 2024
@michael-s-molina michael-s-molina added v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Apr 4, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 4, 2024
EandrewJones pushed a commit to UMD-ARLIS/superset that referenced this pull request Apr 5, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 8, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request Apr 12, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
@mistercrunch mistercrunch added 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 2, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants