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: presto CI failed test #23666

Merged
merged 1 commit into from
Apr 12, 2023
Merged

fix: presto CI failed test #23666

merged 1 commit into from
Apr 12, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Apr 12, 2023

SUMMARY

forgot to add the tripple quotes needed for presto queries to work for the refactor

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING 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

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #23666 (945e626) into master (a5b6ccc) will increase coverage by 0.14%.
The diff coverage is 81.25%.

❗ Current head 945e626 differs from pull request most recent head 91ef130. Consider uploading reports for the commit 91ef130 to get more accurate results

@@            Coverage Diff             @@
##           master   #23666      +/-   ##
==========================================
+ Coverage   67.94%   68.08%   +0.14%     
==========================================
  Files        1918     1919       +1     
  Lines       73890    73956      +66     
  Branches     8058     8087      +29     
==========================================
+ Hits        50204    50356     +152     
+ Misses      21625    21528      -97     
- Partials     2061     2072      +11     
Flag Coverage Δ
hive 53.16% <0.00%> (ø)
mysql 79.21% <0.00%> (ø)
postgres 79.29% <0.00%> (ø)
presto 53.08% <100.00%> (?)
python 83.14% <100.00%> (+0.11%) ⬆️
sqlite 77.78% <0.00%> (ø)
unit 53.02% <0.00%> (ø)

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

Impacted Files Coverage Δ
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...perset-ui-core/src/chart/components/SuperChart.tsx 100.00% <ø> (ø)
...et-ui-core/src/chart/components/SuperChartCore.tsx 100.00% <ø> (ø)
...s/plugin-chart-echarts/src/Timeseries/constants.ts 100.00% <ø> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 57.27% <0.00%> (-1.07%) ⬇️
...tend/plugins/plugin-chart-echarts/src/constants.ts 100.00% <ø> (ø)
...tend/plugins/plugin-chart-echarts/src/controls.tsx 76.00% <ø> (ø)
...ugins/preset-chart-xy/src/components/Line/Line.tsx 0.00% <ø> (ø)
...preset-chart-xy/src/utils/createMarginSelector.tsx 0.00% <ø> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <ø> (ø)
... and 16 more

... and 5 files with indirect coverage changes

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

@hughhhh hughhhh merged commit 976e333 into master Apr 12, 2023
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.

Hugh, I don't think this is the right solution... if other databases are working fine and just Presto is not quoting the strings then we need to understand why.

@@ -1314,7 +1314,7 @@ def dttm_sql_literal(self, dttm: sa.DateTime, col_type: Optional[str]) -> str:
if sql:
return sql

return f'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'
return f"""'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'"""
Copy link
Member

Choose a reason for hiding this comment

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

This is the wrong place to fix this... the single quotes are a database-specific construction, and adding them should be delegated to the database.

Where is dttm_sql_literal called? Why are other DBs quoting this correctly but not Presto?

Copy link
Member

Choose a reason for hiding this comment

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

Later this gets wrapped in a text() clause (see BaseEnginesSpec.get_text_clause) so the string itself will contain single quotes.

Copy link
Member Author

Choose a reason for hiding this comment

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

So i was following a pattern i saw in the original dttm_sql_literal, right now the original is now an override for SqlaTable queries vs. Query queries

def dttm_sql_literal(self, dttm: DateTime) -> str:

sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the fix-preset-ci branch March 26, 2024 17:55
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 size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants