You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/04/13 07:36:49 UTC
[GitHub] [superset] john-bodley opened a new pull request, #23674: chore(presto): Expose schema and indexes to _partition_query method
john-bodley opened a new pull request, #23674:
URL: https://github.com/apache/superset/pull/23674
<!---
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] john-bodley commented on a diff in pull request #23674: chore(presto): Expose schema and indexes to _partition_query method
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23674:
URL: https://github.com/apache/superset/pull/23674#discussion_r1166076776
##########
superset/db_engine_specs/presto.py:
##########
@@ -423,24 +423,30 @@ def get_function_names(cls, database: Database) -> List[str]:
return database.get_df("SHOW FUNCTIONS")["Function"].tolist()
@classmethod
- def _partition_query( # pylint: disable=too-many-arguments,too-many-locals
+ def _partition_query( # pylint: disable=too-many-arguments,too-many-locals,unused-argument
cls,
+ schema: Optional[str],
table_name: str,
+ indexes: List[Dict[str, Any]],
database: Database,
limit: int = 0,
order_by: Optional[List[Tuple[str, bool]]] = None,
filters: Optional[Dict[Any, Any]] = None,
) -> str:
- """Returns a partition query
+ """
+ Return a partition query.
+ Note the unused arguments are exposed for sub-classing purposes where custom
Review Comment:
@michael-s-molina per our offline discussion I added this comment as to why the unused arguments are included.
--
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] john-bodley merged pull request #23674: chore(presto): Expose schema and indexes to _partition_query method
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #23674:
URL: https://github.com/apache/superset/pull/23674
--
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] john-bodley commented on a diff in pull request #23674: chore(presto): Expose schema and indexes to _partition_query method
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23674:
URL: https://github.com/apache/superset/pull/23674#discussion_r1165321738
##########
superset/db_engine_specs/presto.py:
##########
@@ -423,24 +423,27 @@ def get_function_names(cls, database: Database) -> List[str]:
return database.get_df("SHOW FUNCTIONS")["Function"].tolist()
@classmethod
- def _partition_query( # pylint: disable=too-many-arguments,too-many-locals
+ def _partition_query( # pylint: disable=too-many-arguments,too-many-locals,unused-argument
cls,
+ schema: Optional[str],
Review Comment:
Given this is a private method, changing the order of the function arguments is deemed non-breaking.
--
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 #23674: chore(presto): Expose schema and indexes to _partition_query method
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23674:
URL: https://github.com/apache/superset/pull/23674#issuecomment-1506723817
## [Codecov](https://codecov.io/gh/apache/superset/pull/23674?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 [#23674](https://codecov.io/gh/apache/superset/pull/23674?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c2fd48a) into [master](https://codecov.io/gh/apache/superset/commit/b35b5a6e0557b53207940935b34f57c76253bb16?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b35b5a6) will **decrease** coverage by `11.43%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head c2fd48a differs from pull request most recent head 30c721e. Consider uploading reports for the commit 30c721e to get more accurate results
```diff
@@ Coverage Diff @@
## master #23674 +/- ##
===========================================
- Coverage 68.08% 56.66% -11.43%
===========================================
Files 1920 1920
Lines 73990 73990
Branches 8092 8092
===========================================
- Hits 50379 41926 -8453
- Misses 21540 29993 +8453
Partials 2071 2071
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `53.09% <100.00%> (ø)` | |
| python | `59.41% <100.00%> (-23.73%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `53.03% <100.00%> (ø)` | |
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/23674?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/hive.py](https://codecov.io/gh/apache/superset/pull/23674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `33.89% <ø> (-53.90%)` | :arrow_down: |
| [superset/db\_engine\_specs/trino.py](https://codecov.io/gh/apache/superset/pull/23674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3RyaW5vLnB5) | `79.20% <ø> (-4.80%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/23674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `46.12% <100.00%> (-41.72%)` | :arrow_down: |
... and [299 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23674/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] michael-s-molina commented on a diff in pull request #23674: chore(presto): Expose schema and indexes to _partition_query method
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23674:
URL: https://github.com/apache/superset/pull/23674#discussion_r1166667974
##########
superset/db_engine_specs/presto.py:
##########
@@ -423,24 +423,30 @@ def get_function_names(cls, database: Database) -> List[str]:
return database.get_df("SHOW FUNCTIONS")["Function"].tolist()
@classmethod
- def _partition_query( # pylint: disable=too-many-arguments,too-many-locals
+ def _partition_query( # pylint: disable=too-many-arguments,too-many-locals,unused-argument
cls,
table_name: str,
+ schema: Optional[str],
+ indexes: List[Dict[str, Any]],
database: Database,
limit: int = 0,
order_by: Optional[List[Tuple[str, bool]]] = None,
filters: Optional[Dict[Any, Any]] = None,
) -> str:
- """Returns a partition query
+ """
+ Return a partition query.
+
+ Note the unused arguments are exposed for sub-classing purposes where custom
+ integrations may require the schema, indexes, etc. to build the paritiion query.
Review Comment:
```suggestion
integrations may require the schema, indexes, etc. to build the partition query.
```
--
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