Skip to content

feat(db-engine): Add support for Apache Solr - #12403

Merged
villebro merged 2 commits into
apache:masterfrom
aadel:feature/apache-solr-support
Jan 15, 2021
Merged

villebro merged 2 commits into
apache:masterfrom
aadel:feature/apache-solr-support

Conversation

@aadel

@aadel aadel commented Jan 10, 2021

Copy link
Copy Markdown
Contributor

SUMMARY

Adding support for Apache Solr through SQLAlchemy DBAPI subject to features provided by and limitations of Solr Parallel SQL interface. An engine spec is included.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Example Charts:

Screen Shot 2021-01-10 at 6 31 27 AM
Screen Shot 2021-01-10 at 6 36 21 AM
Screen Shot 2021-01-10 at 6 44 20 AM
Screen Shot 2021-01-10 at 6 50 08 AM
Screen Shot 2021-01-10 at 7 06 54 AM
Screen Shot 2021-01-10 at 7 12 50 AM

TEST PLAN

Most of the testing is maintained on sqlalchemy-solr package since the current engine spec is skeletal.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@aadel aadel changed the title [db engine] Add support for Apache Solr [feat] Add support for Apache Solr Jan 10, 2021
@codecov-io

codecov-io commented Jan 10, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #12403 (b34c404) into master (76b06b2) will decrease coverage by 4.59%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12403      +/-   ##
==========================================
- Coverage   66.94%   62.35%   -4.60%     
==========================================
  Files        1014     1015       +1     
  Lines       49516    49602      +86     
  Branches     5068     4839     -229     
==========================================
- Hits        33147    30927    -2220     
- Misses      16239    18477    +2238     
- Partials      130      198      +68     
Flag Coverage Δ
cypress ?
javascript 60.73% <ø> (+0.03%) ⬆️
python 63.40% <100.00%> (-0.81%) ⬇️

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

Impacted Files Coverage Δ
superset/db_engine_specs/solr.py 100.00% <100.00%> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/chart/ChartContainer.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/reducers/index.js 0.00% <0.00%> (-100.00%) ⬇️
...et-frontend/src/dashboard/containers/Dashboard.jsx 0.00% <0.00%> (-100.00%) ⬇️
...et-frontend/src/filters/components/Select/types.ts 0.00% <0.00%> (-100.00%) ⬇️
...t-frontend/src/dashboard/containers/SliceAdder.jsx 0.00% <0.00%> (-100.00%) ⬇️
...t-frontend/src/explore/reducers/getInitialState.js 0.00% <0.00%> (-100.00%) ⬇️
... and 261 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76b06b2...b34c404. Read the comment docs.

@aadel aadel changed the title [feat] Add support for Apache Solr feat(db-engine): Add support for Apache Solr Jan 10, 2021
@villebro
villebro requested a review from srinify January 10, 2021 19:29

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is awesome @aadel, thanks so much for adding support for Solr! 🎉 LGTM, but requesting review from @srinify to check the docs changes.

@aadel

aadel commented Jan 10, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @villebro! I'm also excited adding support for Solr! 💯

@amitmiran137

Copy link
Copy Markdown
Member

Is there a plan on the roadmap to support facets?
How would a SQL query would look like for that ?

@aadel

aadel commented Jan 11, 2021

Copy link
Copy Markdown
Contributor Author

@amitmiran137 Actually the concept of facets is associated with Lucene/Solr however, the SQL interface uses supports aggregations, predicates and sorting using standard syntax which give the same results for supported scenarios. Internally, the SQL interface in the default mode uses the JSON Facet API or StatsComponent for aggregations. In this mode, the aggregations logic is pushed down into the search engine and the aggregates are returned.

@willbarrett
willbarrett requested a review from dpgaspar January 11, 2021 14:15
@willbarrett

Copy link
Copy Markdown
Member

Nice! Added @dpgaspar as a reviewer as well.

@dpgaspar dpgaspar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome!

Comment thread superset/db_engine_specs/solr.py Outdated
"""Engine spec for Apache Solr"""

engine = "solr"
engine_name = "Apach Solr"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: typo here. It should be "Apache"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for catching @duynguyenhoang ! This would be good to fix before merging.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hey @aadel this PR looks good minus this one typo! "Apach" -> "Apache"

Fix this and I'd be happy to approve!

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Request to fix typo that was picked up by @duynguyenhoang

Comment thread superset/db_engine_specs/solr.py Outdated
"""Engine spec for Apache Solr"""

engine = "solr"
engine_name = "Apach Solr"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for catching @duynguyenhoang ! This would be good to fix before merging.

Comment thread superset/db_engine_specs/solr.py Outdated
"""Engine spec for Apache Solr"""

engine = "solr"
engine_name = "Apach Solr"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hey @aadel this PR looks good minus this one typo! "Apach" -> "Apache"

Fix this and I'd be happy to approve!

@villebro
villebro merged commit e6a76a5 into apache:master Jan 15, 2021
@villebro villebro added the v1.0 label Jan 15, 2021
villebro pushed a commit that referenced this pull request Jan 15, 2021
* [db engine] Add support for Apache Solr

* Fixing typo
etr2460 pushed a commit that referenced this pull request Jan 25, 2021
* release: bump to 1.0.0 and CHANGELOG

* fix(explore): long metric name display (#12387)

* fix(explore): long metric name display

* add tooltip to control

* chore: Show datasets when search input is empty (#12391)

* chore: Fix typo “Rest” to “Reset” (#12392)

* chore: upgrade eslint, babel, and prettier (#12393)

* feat(explore): add tooltip to timepicker label (#12401)

* chore: change Datasource to Dataset in Explore ui (#12402)

* chore(explore):change dataset to datasource in ui

* modal

* Add space

* Changing it back🤦🏾‍♀️

* Chargeback

* fix: Refresh Interval Modal dropdown (#12406)

* fix(native-filters): incorrect queriesData state (#12409)

* refactor: from superset.utils.core break down date_parser (#12408)

* Fixes control panel fields styling (#12236) (#12326)

* feat: Resizable dataset and controls panels on Explore view (#12411)

* Implement resizable panels on explore view

* Optimize chart rendering while resizing

* Make dataset column narrower

Co-authored-by: Evan Rusackas <[email protected]>

* fix(dashboard): artefacts shown while drag and dropping deck.gl charts (#12418)

* [12181] Fix artifacts while drag and dropping deck.gl charts.

* Run prettier

* bump superset-ui packages for rolling window change (#12426)

* chore: bump superset-ui deckgl plugin (#12466)

* fix: do not show vertical scrollbar for charts in dashboard (#12478)

* fix: do not show vertical scrollbar for charts in dashboard

* Proper fix for #11419

Co-authored-by: Jesse Yang <[email protected]>

* fix(dashboard): use datasource id from slice metadata (#12483)

* fix(timepicker): make pyparsing thread safe (#12489)

* fix: make pyparsing thread safe

* remove parenthesis for decorator

* fix (SQL Lab): disappearing results on tab switch (#12472)

* fix (SQL Lab): disappearing results on tab switch

* Remove state

* Fix test

* fix: import ZIP files that have been modified (#12425)

* fix: import ZIP files that have been modified

* Add unit test

* update changelog with rc2 entries

* fix: impose dataset ownership check on old API (#12491)

* fix: impose dataset ownership check on old API

* update UPDATING.md

* partially protect the old MVC also

* prevent metric and column add and update

* ci: remove refs/tags from docker tags on a release (#12518)

* ci: remove refs/tags from docker tags on a release

* wider head

* fix: lowercase all columns in examples (#12530)

* fix(explore): time table control panel (#12532)

* fix(explore): Add Time section back to FilterBox (#12537)

* Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (#12536)

* fix: Select options overflowing Save chart modal on Explore view (#12522)

* Fix select options overflowing modal

* fix unit test

Co-authored-by: Ville Brofeldt <[email protected]>

* Fix list filters vertical alignment (#12497)

* feat(db-engine): Add support for Apache Solr (#12403)

* [db engine] Add support for Apache Solr

* Fixing typo

* chore: rename docker image in build_docker_image.sh, docker-compose.yml and helm values.yaml (#12337)

* add rc3 changelog entries

* fix: Popover closes on change of dropdowns values (#12410)

* fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (#12555)

* fix(viz): missing groupby and broken adhoc metrics for boxplot (#12556)

* fix: height on grid results (#12558)

* fix: case expression should not have double quotes (#12562)

* Fix 500 error when loading dashboards with slice having deleted dataset (#12535)

* add rc4 changelog entries

* Fixed typo on line 348

* Added files

Co-authored-by: Daniel Gaspar <[email protected]>
Co-authored-by: Yongjie Zhao <[email protected]>
Co-authored-by: Geido <[email protected]>
Co-authored-by: Junlin Chen <[email protected]>
Co-authored-by: Jesse Yang <[email protected]>
Co-authored-by: Agata Stawarz <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Kamil Gabryjelski <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Kasia Kucharczyk <[email protected]>
Co-authored-by: Phillip Kelley-Dotson <[email protected]>
Co-authored-by: Grace Guo <[email protected]>
Co-authored-by: Beto Dealmeida <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Xiang Fu <[email protected]>
Co-authored-by: Ahmed Adel <[email protected]>
Co-authored-by: Amit Miran <[email protected]>
Co-authored-by: Hugh A. Miles II <[email protected]>
Co-authored-by: Shuyao Bi <[email protected]>
Co-authored-by: Lyndsi Kay Williams <[email protected]>
@mistercrunch mistercrunch added 🍒 1.0.0 Cherry-picked to 1.0.0 🍒 1.0.1 Cherry-picked to 1.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 First shipped in 1.2.0 labels Mar 12, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* [db engine] Add support for Apache Solr

* Fixing typo
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* release: bump to 1.0.0 and CHANGELOG

* fix(explore): long metric name display (apache#12387)

* fix(explore): long metric name display

* add tooltip to control

* chore: Show datasets when search input is empty (apache#12391)

* chore: Fix typo “Rest” to “Reset” (apache#12392)

* chore: upgrade eslint, babel, and prettier (apache#12393)

* feat(explore): add tooltip to timepicker label (apache#12401)

* chore: change Datasource to Dataset in Explore ui (apache#12402)

* chore(explore):change dataset to datasource in ui

* modal

* Add space

* Changing it back🤦🏾‍♀️

* Chargeback

* fix: Refresh Interval Modal dropdown (apache#12406)

* fix(native-filters): incorrect queriesData state (apache#12409)

* refactor: from superset.utils.core break down date_parser (apache#12408)

* Fixes control panel fields styling (apache#12236) (apache#12326)

* feat: Resizable dataset and controls panels on Explore view (apache#12411)

* Implement resizable panels on explore view

* Optimize chart rendering while resizing

* Make dataset column narrower

Co-authored-by: Evan Rusackas <[email protected]>

* fix(dashboard): artefacts shown while drag and dropping deck.gl charts (apache#12418)

* [12181] Fix artifacts while drag and dropping deck.gl charts.

* Run prettier

* bump superset-ui packages for rolling window change (apache#12426)

* chore: bump superset-ui deckgl plugin (apache#12466)

* fix: do not show vertical scrollbar for charts in dashboard (apache#12478)

* fix: do not show vertical scrollbar for charts in dashboard

* Proper fix for apache#11419

Co-authored-by: Jesse Yang <[email protected]>

* fix(dashboard): use datasource id from slice metadata (apache#12483)

* fix(timepicker): make pyparsing thread safe (apache#12489)

* fix: make pyparsing thread safe

* remove parenthesis for decorator

* fix (SQL Lab): disappearing results on tab switch (apache#12472)

* fix (SQL Lab): disappearing results on tab switch

* Remove state

* Fix test

* fix: import ZIP files that have been modified (apache#12425)

* fix: import ZIP files that have been modified

* Add unit test

* update changelog with rc2 entries

* fix: impose dataset ownership check on old API (apache#12491)

* fix: impose dataset ownership check on old API

* update UPDATING.md

* partially protect the old MVC also

* prevent metric and column add and update

* ci: remove refs/tags from docker tags on a release (apache#12518)

* ci: remove refs/tags from docker tags on a release

* wider head

* fix: lowercase all columns in examples (apache#12530)

* fix(explore): time table control panel (apache#12532)

* fix(explore): Add Time section back to FilterBox (apache#12537)

* Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (apache#12536)

* fix: Select options overflowing Save chart modal on Explore view (apache#12522)

* Fix select options overflowing modal

* fix unit test

Co-authored-by: Ville Brofeldt <[email protected]>

* Fix list filters vertical alignment (apache#12497)

* feat(db-engine): Add support for Apache Solr (apache#12403)

* [db engine] Add support for Apache Solr

* Fixing typo

* chore: rename docker image in build_docker_image.sh, docker-compose.yml and helm values.yaml (apache#12337)

* add rc3 changelog entries

* fix: Popover closes on change of dropdowns values (apache#12410)

* fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (apache#12555)

* fix(viz): missing groupby and broken adhoc metrics for boxplot (apache#12556)

* fix: height on grid results (apache#12558)

* fix: case expression should not have double quotes (apache#12562)

* Fix 500 error when loading dashboards with slice having deleted dataset (apache#12535)

* add rc4 changelog entries

* Fixed typo on line 348

* Added files

Co-authored-by: Daniel Gaspar <[email protected]>
Co-authored-by: Yongjie Zhao <[email protected]>
Co-authored-by: Geido <[email protected]>
Co-authored-by: Junlin Chen <[email protected]>
Co-authored-by: Jesse Yang <[email protected]>
Co-authored-by: Agata Stawarz <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Kamil Gabryjelski <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Kasia Kucharczyk <[email protected]>
Co-authored-by: Phillip Kelley-Dotson <[email protected]>
Co-authored-by: Grace Guo <[email protected]>
Co-authored-by: Beto Dealmeida <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Xiang Fu <[email protected]>
Co-authored-by: Ahmed Adel <[email protected]>
Co-authored-by: Amit Miran <[email protected]>
Co-authored-by: Hugh A. Miles II <[email protected]>
Co-authored-by: Shuyao Bi <[email protected]>
Co-authored-by: Lyndsi Kay Williams <[email protected]>
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/M v1.0 🍒 1.0.0 Cherry-picked to 1.0.0 🍒 1.0.1 Cherry-picked to 1.0.1 🚢 1.2.0 First shipped in 1.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants