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: Enable explore button on SQL Lab view when connected to Apache Pinot as a database #28364

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

soumitra-st
Copy link
Contributor

Older versions of Pinot did not support subquery, hence the explore view on SQL Lab was disabled. Apache Pinot 1.0 added support for subquery, join, etc. in multi-stage query engine, so this PR enables the explore button.

Create chart button is disabled before the fix

create-chart-disabled

Create chart button is enabled after the fix

Screenshot 2024-05-06 at 6 32 59 PM

Query in explore view

explore-view

Query with alias in SQL Lab

alias-in-query

Query with alias in explore

explore-query-with-alias

ADDITIONAL INFORMATION

Fixes #13623 issue

  • Changes UI

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@michael-s-molina michael-s-molina added risk:breaking-change Issues or PRs that will introduce breaking changes hold! On hold labels May 7, 2024
Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

@soumitra-st thanks for the change. Per here it seems like the current version of the DB-API only supports Pinto version 0.9.3 (I'm not sure if this is a single version or a limit bound) and thus I don't think we can merge this.

Additionally this change would be deemed breaking for anyone using an older version of Pinot and thus cannot be merged (as is) until the breaking window for 5.0 opens.

In the interim you can locally override your version of the PinotEngineSpec to include the relevant settings.

superset/db_engine_specs/pinot.py Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/XS and removed size/S labels May 7, 2024
@soumitra-st
Copy link
Contributor Author

Thanks @john-bodley for your comments. IMO, the PR is fixing a bug not breaking existing functionality. Wondering why is it a breaking change?

I tested the changes using pinotdb==5.2.0 and Pinot version 1.1.0. I will work on updating the supported version of pinotdb module to 1.1.0. If I can get a release of pinotdb that is compatible with Pinot version 0.9.3 onwards, then would this change still be considered as breaking?

@soumitra-st
Copy link
Contributor Author

@john-bodley I checked internally, the latest pinotdb module supports Pinot version 1.1.0, and we have merged the PR to update the version here.

@rusackas
Copy link
Member

rusackas commented May 7, 2024

Running CI 🤞 Please feel free to open a commit adding your org to our In the Wild page if you want to get a trivial PR under your belt and remove the need to manually trigger CI on every change.

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.69%. Comparing base (76d897e) to head (7bea705).
Report is 966 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #28364       +/-   ##
===========================================
+ Coverage   60.48%   83.69%   +23.21%     
===========================================
  Files        1931      518     -1413     
  Lines       76236    37642    -38594     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    31506    -14608     
+ Misses      28017     6136    -21881     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 48.87% <ø> (-0.30%) ⬇️
javascript ?
mysql 77.27% <ø> (?)
postgres 77.35% <ø> (?)
presto 53.47% <ø> (-0.34%) ⬇️
python 83.69% <ø> (+20.21%) ⬆️
sqlite 76.80% <ø> (?)
unit 59.16% <ø> (+1.53%) ⬆️

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.

@soumitra-st soumitra-st changed the title Enable explore button on SQL Lab view when connected to Apache Pinot as a database fix: Enable explore button on SQL Lab view when connected to Apache Pinot as a database May 8, 2024
@soumitra-st
Copy link
Contributor Author

breaking window for 5.0 opens

@john-bodley , shall we merge this PR as it is? If not, what is the timeline for 5.0 release?

@xiangfu0
Copy link
Contributor

Latest pinotdb version: 5.3.0 supports newer version of Pinot.
Can you please also update the pinotdb version to pinot = ["pinotdb>=5.0.0, <6.0.0"] here: https://github.com/apache/superset/blob/master/pyproject.toml#L154

@sfirke
Copy link
Member

sfirke commented Jul 3, 2024

Does pinotdb 5.3.0 support earlier versions of pinot than 1.1.0? If so then it seems like this would not be a breaking change and could be merged now in my opinion.

Even if not, I expect this is worthwhile to merge at 5.0.0 and pinot users would need to update their pinot version along with the Superset upgrade.

@rusackas rusackas added the data:connect:pinot Related to Pinot label Jul 3, 2024
@xiangfu0
Copy link
Contributor

xiangfu0 commented Jul 4, 2024

Does pinotdb 5.3.0 support earlier versions of pinot than 1.1.0? If so then it seems like this would not be a breaking change and could be merged now in my opinion.

Even if not, I expect this is worthwhile to merge at 5.0.0 and pinot users would need to update their pinot version along with the Superset upgrade.

Correct, this is not a breaking change. New client library supports both old (<1.0.0) and new (>=1.0.0) query endpoints/protocols.

@sfirke sfirke removed risk:breaking-change Issues or PRs that will introduce breaking changes hold! On hold labels Jul 5, 2024
@sfirke sfirke merged commit 6d2b3b8 into apache:master Jul 5, 2024
38 of 41 checks passed
eschutho pushed a commit that referenced this pull request Jul 24, 2024
@github-actions github-actions bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 14, 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:pinot Related to Pinot doc Namespace | Anything related to documentation size/S 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Explore' button on SQL Lab view disabled when connected to Apache Pinot as a database
7 participants