You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/01 22:34:04 UTC

[GitHub] [superset] ktmud commented on a change in pull request #19495: perf: speed up db migration for deprecating time_range_endpoints

ktmud commented on a change in pull request #19495:
URL: https://github.com/apache/superset/pull/19495#discussion_r840955374



##########
File path: superset/migrations/versions/2ed890b36b94_rm_time_range_endpoints_from_qc.py
##########
@@ -30,7 +30,6 @@
 
 import sqlalchemy as sa
 from alembic import op
-from sqlalchemy.dialects import postgresql

Review comment:
       Bycatch: unused imports

##########
File path: superset/migrations/versions/ab9a9d86e695_deprecate_time_range_endpoints.py
##########
@@ -46,8 +46,8 @@ def upgrade():
     bind = op.get_bind()
     session = db.Session(bind=bind)
 
-    for slc in session.query(Slice):
-        params = json.loads(slc.params or "{}")

Review comment:
       No need to fallback when we already filters to slices definitely have `params`.

##########
File path: superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py
##########
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 """add_saved_query_foreign_key_to_tab_state
+

Review comment:
       Bycatch: this makes `superset db history` prettier




-- 
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