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: Unable to parse escaped tables #30560

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

#26476 introduced a SQLGLOT_DIALECTS mapping to be used when parsing SQL queries with SQLGlot. For companies that have custom database engines, with a name not present in the mapping, the default SQLGlot dialect would be used and could generate problems such as #30551. This PR adds a new configuration to allow extending registered SQLGlot dialects.

Fixes #30551

TESTING INSTRUCTIONS

Check the original issue for 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

@dosubot dosubot bot added the change:backend Requires changing the backend label Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.92%. Comparing base (76d897e) to head (81bcbf5).
Report is 842 commits behind head on master.

Files with missing lines Patch % Lines
superset/config.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #30560       +/-   ##
===========================================
+ Coverage   60.48%   83.92%   +23.43%     
===========================================
  Files        1931      533     -1398     
  Lines       76236    38544    -37692     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    32349    -13765     
+ Misses      28017     6195    -21822     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 49.00% <85.71%> (-0.16%) ⬇️
javascript ?
mysql 76.79% <85.71%> (?)
postgres 76.89% <85.71%> (?)
presto 53.49% <85.71%> (-0.31%) ⬇️
python 83.92% <85.71%> (+20.43%) ⬆️
sqlite 76.34% <85.71%> (?)
unit 60.72% <85.71%> (+3.09%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-s-molina michael-s-molina added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Oct 9, 2024
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Awesome!

superset/config.py Outdated Show resolved Hide resolved
superset/sql_parse.py Show resolved Hide resolved
@michael-s-molina michael-s-molina merged commit fc857d9 into apache:master Oct 9, 2024
37 checks passed
sadpandajoe pushed a commit that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:backend Requires changing the backend size/M v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to parse escaped tables
2 participants