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: move dynamic schema out of base Postgres class #23868

Merged
merged 3 commits into from
May 1, 2023
Merged

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Apr 28, 2023

SUMMARY

Moving specific logic to PostgresEngineSpec to allow other specs (Redshift) to have more control over how we create the engine since the options keys are not the same for individuals

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 Apr 28, 2023

Codecov Report

Merging #23868 (3aee03c) into master (594d3e0) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 3aee03c differs from pull request most recent head 2b84d6a. Consider uploading reports for the commit 2b84d6a to get more accurate results

@@           Coverage Diff           @@
##           master   #23868   +/-   ##
=======================================
  Coverage   68.11%   68.11%           
=======================================
  Files        1938     1938           
  Lines       74972    74972           
  Branches     8141     8141           
=======================================
  Hits        51067    51067           
  Misses      21826    21826           
  Partials     2079     2079           
Flag Coverage Δ
hive 53.01% <27.77%> (ø)
mysql 78.80% <61.11%> (ø)
postgres 78.88% <61.11%> (ø)
presto 52.93% <27.77%> (ø)
python 82.67% <100.00%> (ø)
sqlite 77.39% <61.11%> (ø)
unit 52.81% <94.44%> (ø)

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

Impacted Files Coverage Δ
superset/db_engine_specs/postgres.py 97.12% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

)
return schemas[0]

options = re.split(r"-c\s?", connect_args.get("options", ""))
Copy link
Member

Choose a reason for hiding this comment

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

I think we can actually get rid of the get_schema_from_engine_params method here, since Redshift doesn't support passing search_path as far as I could see.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 28, 2023
@eschutho
Copy link
Member

eschutho commented Apr 28, 2023

@hughhhh or @betodealmeida Netezza, snowflake, hana and vertica also are based from the PostgresBaseEngineSpec. Have we tested how this change impacts those dbs?

@hughhhh
Copy link
Member Author

hughhhh commented Apr 28, 2023

@hughhhh or @betodealmeida Netezza, snowflake, hana and vertica also are based from the PostgresBaseEngineSpec. Have we tested how this change impacts those dbs?

this is basically a revert on what current functionality, instead of having supports_dynamic_schema = True in the base class instead we moved this functionality to live only in the specific engine specs snowflake example

i can write a test to verify this

@hughhhh hughhhh merged commit ba00dfa into master May 1, 2023
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request May 1, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the fix-connect-eng branch March 26, 2024 17:55
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 preset:2023.17 size/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants