You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hughhhh (via GitHub)" <gi...@apache.org> on 2023/04/28 17:23:43 UTC
[GitHub] [superset] hughhhh opened a new pull request, #23868: fix: move dynamic schema out of base Postgres class
hughhhh opened a new pull request, #23868:
URL: https://github.com/apache/superset/pull/23868
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #23868: fix: move dynamic schema out of base Postgres class
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23868:
URL: https://github.com/apache/superset/pull/23868#issuecomment-1527880411
## [Codecov](https://codecov.io/gh/apache/superset/pull/23868?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#23868](https://codecov.io/gh/apache/superset/pull/23868?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (61c03c7) into [master](https://codecov.io/gh/apache/superset/commit/594d3e0e0c4add06c1216490c63cdc6ac43e2f5a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (594d3e0) will **decrease** coverage by `11.40%`.
> The diff coverage is `61.53%`.
> :exclamation: Current head 61c03c7 differs from pull request most recent head 3d612d4. Consider uploading reports for the commit 3d612d4 to get more accurate results
```diff
@@ Coverage Diff @@
## master #23868 +/- ##
===========================================
- Coverage 68.11% 56.71% -11.40%
===========================================
Files 1938 1938
Lines 74972 74983 +11
Branches 8141 8141
===========================================
- Hits 51067 42528 -8539
- Misses 21826 30376 +8550
Partials 2079 2079
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.91% <15.38%> (-0.02%)` | :arrow_down: |
| python | `59.10% <61.53%> (-23.57%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `52.80% <61.53%> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/23868?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/superset/pull/23868?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `68.00% <61.53%> (-29.13%)` | :arrow_down: |
... and [306 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23868/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] hughhhh commented on pull request #23868: fix: move dynamic schema out of base Postgres class
Posted by "hughhhh (via GitHub)" <gi...@apache.org>.
hughhhh commented on PR #23868:
URL: https://github.com/apache/superset/pull/23868#issuecomment-1528174249
> @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](https://github.com/apache/superset/blob/8d14420d14e572d9101d772e06c5d980f55502b2/superset/db_engine_specs/snowflake.py#L87)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] hughhhh merged pull request #23868: fix: move dynamic schema out of base Postgres class
Posted by "hughhhh (via GitHub)" <gi...@apache.org>.
hughhhh merged PR #23868:
URL: https://github.com/apache/superset/pull/23868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] betodealmeida commented on a diff in pull request #23868: fix: move dynamic schema out of base Postgres class
Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on code in PR #23868:
URL: https://github.com/apache/superset/pull/23868#discussion_r1180739200
##########
superset/db_engine_specs/postgres.py:
##########
@@ -205,17 +185,19 @@ def get_schema_from_engine_params(
to determine the schema for a non-qualified table in a query. In cases like
that we raise an exception.
"""
- options = parse_options(connect_args)
- if search_path := options.get("search_path"):
- schemas = search_path.split(",")
- if len(schemas) > 1:
- raise Exception(
- "Multiple schemas are configured in the search path, which means "
- "Superset is unable to determine the schema of unqualified table "
- "names and enforce permissions."
- )
- return schemas[0]
-
+ options = re.split(r"-c\s?", connect_args.get("options", ""))
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on pull request #23868: fix: move dynamic schema out of base Postgres class
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on PR #23868:
URL: https://github.com/apache/superset/pull/23868#issuecomment-1528147567
@hughhhh or @betodealmeida Netezza, snowflake and vertica also are based from the `PostgresBaseEngineSpec`. Have we tested how this change impacts those dbs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org