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(backend): DB engine Error when trying to create custom SQL Column #21279

Closed
wants to merge 7 commits into from

Conversation

agl-developer
Copy link
Contributor

SUMMARY

This issue was happened because in backend, when we validate sql, we got wrong sql string from columns.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

AFTER:
Video

TESTING INSTRUCTIONS

  1. Create a Table with Raw Records as the type
  2. Drag in a metric
  3. Add a column using Custom SQL
  4. You can try adding a constant or just type out any column name

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

Sorry, something went wrong.

@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Merging #21279 (d575527) into master (df3b5a8) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head d575527 differs from pull request most recent head e0e0658. Consider uploading reports for the commit e0e0658 to get more accurate results

@@            Coverage Diff             @@
##           master   #21279      +/-   ##
==========================================
- Coverage   66.85%   66.84%   -0.01%     
==========================================
  Files        1805     1799       -6     
  Lines       69061    68871     -190     
  Branches     7369     7332      -37     
==========================================
- Hits        46169    46039     -130     
+ Misses      20995    20952      -43     
+ Partials     1897     1880      -17     
Flag Coverage Δ
hive 52.91% <100.00%> (-0.01%) ⬇️
mysql 78.24% <100.00%> (-0.01%) ⬇️
postgres 78.30% <100.00%> (-0.01%) ⬇️
presto 52.81% <100.00%> (-0.01%) ⬇️
python 81.44% <100.00%> (-0.01%) ⬇️
sqlite 76.80% <100.00%> (+0.01%) ⬆️
unit 50.95% <100.00%> (-0.12%) ⬇️

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

Impacted Files Coverage Δ
superset/connectors/sqla/models.py 90.60% <100.00%> (-0.13%) ⬇️
...lUtils/getControlValuesCompatibleWithDatasource.ts 8.00% <0.00%> (-72.00%) ⬇️
...c/SqlLab/components/RunQueryActionButton/index.tsx 72.72% <0.00%> (-6.07%) ⬇️
...frontend/src/SqlLab/components/ResultSet/index.tsx 56.41% <0.00%> (-4.89%) ⬇️
...frontend/src/profile/components/CreatedContent.tsx 77.77% <0.00%> (-4.05%) ⬇️
...trols/DateFilterControl/components/CustomFrame.tsx 70.96% <0.00%> (-4.04%) ⬇️
superset/key_value/commands/delete_expired.py 80.76% <0.00%> (-3.24%) ⬇️
superset/key_value/commands/get.py 87.87% <0.00%> (-2.75%) ⬇️
superset/key_value/commands/delete.py 85.29% <0.00%> (-2.59%) ⬇️
...d/components/nativeFilters/FilterCard/ScopeRow.tsx 58.82% <0.00%> (-2.29%) ⬇️
... and 129 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

nytai
nytai previously approved these changes Sep 1, 2022
@nytai nytai dismissed their stale review September 1, 2022 00:25

didn't realize CI was failing. Please address the errors in the tests

@codyml
Copy link
Member

codyml commented Oct 14, 2022

@agl-developer I think another PR got merged that fixes this same issue. Sorry for not getting to this earlier!

# Conflicts:
#	superset/connectors/sqla/models.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants