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(dremio): query with alias #23872

Merged
merged 1 commit into from
Apr 28, 2023
Merged

Conversation

betodealmeida
Copy link
Member

SUMMARY

With GENERIC_CHART_AXES enabled we're producing queries that are invalid for Dremio, eg:

SELECT DATE_TRUNC('day', pickup_date) AS pickup_date,
       COUNT(*)
FROM "reporting"."nyc_trips_weather"
GROUP BY DATE_TRUNC('day', pickup_date)

This happens because Dremio gets confused by the alias pickup_date and the actual column pickup_date.

The solution I found was to turn off projection aliases for Dremio.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2023-04-28 at 13-02-04 Superset

After:

Screenshot 2023-04-28 at 13-01-37 Superset

TESTING INSTRUCTIONS

Connect to Dremio and create a "Big number with trendline" chart showing a simple COUNT(*).

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 28, 2023

Codecov Report

Merging #23872 (73453bc) into master (5f03549) will increase coverage by 11.34%.
The diff coverage is 78.37%.

❗ Current head 73453bc differs from pull request most recent head 99a0965. Consider uploading reports for the commit 99a0965 to get more accurate results

@@             Coverage Diff             @@
##           master   #23872       +/-   ##
===========================================
+ Coverage   56.76%   68.11%   +11.34%     
===========================================
  Files        1937     1938        +1     
  Lines       74929    74973       +44     
  Branches     8133     8141        +8     
===========================================
+ Hits        42534    51068     +8534     
+ Misses      30311    21826     -8485     
+ Partials     2084     2079        -5     
Flag Coverage Δ
hive 53.01% <86.66%> (+<0.01%) ⬆️
mysql 78.80% <100.00%> (?)
postgres 78.88% <100.00%> (?)
presto 52.93% <86.66%> (+<0.01%) ⬆️
python 82.67% <100.00%> (+23.26%) ⬆️
sqlite 77.39% <100.00%> (?)
unit 52.82% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...plugin-chart-echarts/src/BoxPlot/transformProps.ts 55.00% <ø> (ø)
...ns/plugin-chart-echarts/src/Graph/EchartsGraph.tsx 0.00% <ø> (ø)
...rts/src/MixedTimeseries/EchartsMixedTimeseries.tsx 0.00% <ø> (ø)
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
...ins/plugin-chart-echarts/src/Pie/transformProps.ts 55.71% <ø> (ø)
...s/plugin-chart-echarts/src/Radar/transformProps.ts 0.00% <ø> (ø)
...gin-chart-echarts/src/Sunburst/EchartsSunburst.tsx 0.00% <0.00%> (ø)
...lugin-chart-echarts/src/Sunburst/transformProps.ts 0.00% <ø> (ø)
...chart-echarts/src/Timeseries/EchartsTimeseries.tsx 0.00% <0.00%> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 56.75% <ø> (ø)
... and 21 more

... and 314 files with indirect coverage changes

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

@betodealmeida betodealmeida merged commit 707c626 into apache:master Apr 28, 2023
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request May 1, 2023
OskarNS added a commit to OskarNS/superset that referenced this pull request Oct 16, 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
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 preset:2023.17 size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants