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: revert fix(presto preview): re-enable schema previsualization for Trino/Presto table/schemas" #28613

Merged
merged 1 commit into from
May 21, 2024

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented May 20, 2024

SUMMARY

This PR reverts #26782 which was merged last week. Regrettably said logic seems to be problematic and throws a error:

Traceback (most recent call last):
  ...
  File "superset/db_engine_specs/presto.py", line 512, in where_latest_partition
    if col_type_class := getattr(types, col_type_name, None):
TypeError: getattr(): attribute name must be string

given that col_type_name isn't a string but rather a SQLAlchemy SQL type representing the column type—as denoted by the column_type_by_name mapping.

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

cc: @brouberol

@dosubot dosubot bot added the data:connect:presto Related to Presto label May 20, 2024
@john-bodley john-bodley changed the title Revert "fix(presto preview): re-enable schema previsualization for Trino/Presto table/schemas" revert: fix(presto preview): re-enable schema previsualization for Trino/Presto table/schemas" May 20, 2024
@john-bodley john-bodley changed the title revert: fix(presto preview): re-enable schema previsualization for Trino/Presto table/schemas" fix: revert fix(presto preview): re-enable schema previsualization for Trino/Presto table/schemas" May 20, 2024
@brouberol
Copy link
Contributor

Feel free to revert, obviously! However I believe that the initial state was buggy in itself (at least that's what we experienced). If you can, could you add the values of the following variables?

  • col_names
  • values
  • column_type_by_name

If somehow something changed in the types exposed by the col_names and values variable, we could adapt (or even remove) the logic I added. My only doubt is whether reverting will get us back to a working state, or into the initial buggy state.

@john-bodley
Copy link
Member Author

john-bodley commented May 21, 2024

@brouberol during testing I saw values of the form (santized):

  • col_names: ['ds']
  • values: ('2024-05-20',)
  • column_type_by_name {'ds': VARCHAR(), ...}

The TL;DR is—per the well named column_type_by_name mapping—the values are SQLAlchemy types as opposed to str.

@michael-s-molina michael-s-molina merged commit 4fa7619 into master May 21, 2024
35 of 39 checks passed
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 21, 2024
michael-s-molina pushed a commit that referenced this pull request May 21, 2024
…r Trino/Presto table/schemas" (#28613)

(cherry picked from commit 4fa7619)
@john-bodley john-bodley deleted the revert-26782-fix-25636 branch May 21, 2024 18:37
Vitor-Avila pushed a commit to Vitor-Avila/superset that referenced this pull request May 28, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
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 data:connect:presto Related to Presto size/S v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants