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

feat: Add Apache Doris support #24714

Merged
merged 12 commits into from
Nov 21, 2023
Merged

feat: Add Apache Doris support #24714

merged 12 commits into from
Nov 21, 2023

Conversation

liujiwen-up
Copy link
Contributor

@liujiwen-up liujiwen-up commented Jul 17, 2023

SUMMARY

The Apache Doris database is based on the MySQL protocol and introduces the concept of Multi Catalog. Therefore, the engine specification of mysqldb will be incompatible with the catalog, and some field types are not the same as those in mysql. To fix these issues, I added the Apache Doris engine specification.

Main difference:

  • Supports the connection of Doris's Multi Catalog

  • Fixed the problem that only "BASE TABLE" was displayed in information_schema

  • Fixed data types for JSONB, DATEV2, DATETIMEV2, DECIMALV3, MAP, STRUCT, LARGEINT, QUANTILE_STATE and AGG_STATE

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

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.

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (07551dc) 69.06% compared to head (1eaeaef) 69.09%.

Files Patch % Lines
superset/db_engine_specs/doris.py 89.18% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #24714      +/-   ##
==========================================
+ Coverage   69.06%   69.09%   +0.03%     
==========================================
  Files        1939     1940       +1     
  Lines       75796    75870      +74     
  Branches     8444     8444              
==========================================
+ Hits        52349    52426      +77     
+ Misses      21271    21268       -3     
  Partials     2176     2176              
Flag Coverage Δ
hive 53.68% <79.72%> (+0.05%) ⬆️
javascript 56.27% <ø> (ø)
mysql 78.16% <79.72%> (?)
postgres 78.26% <79.72%> (+<0.01%) ⬆️
presto 53.64% <79.72%> (+0.05%) ⬆️
python 82.95% <89.18%> (+0.04%) ⬆️
sqlite 76.91% <79.72%> (+<0.01%) ⬆️
unit 55.79% <89.18%> (+0.06%) ⬆️

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.

@liujiwen-up
Copy link
Contributor Author

LGTM

@liujiwen-up liujiwen-up changed the title Add Apache Doris support feat:Add Apache Doris support Sep 25, 2023
@liujiwen-up
Copy link
Contributor Author

@villebro Hello, can you help me review it?

Copy link

@ThreatLEVELred ThreatLEVELred left a comment

Choose a reason for hiding this comment

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

wow that was two hours straight

docs/docs/databases/doris.mdx Show resolved Hide resolved
@liujiwen-up
Copy link
Contributor Author

LGTM

@liujiwen-up liujiwen-up changed the title feat:Add Apache Doris support feat: Add Apache Doris support Oct 19, 2023
@liujiwen-up
Copy link
Contributor Author

@villebro
Can you help trigger workflows?

@liujiwen-up
Copy link
Contributor Author

liujiwen-up commented Oct 23, 2023

@betodealmeida Hello, excuse me for a few minutes, can you help me review it?

@john-bodley
Copy link
Member

@liujiwen-up I've triggered the workflows for you.

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.

Thanks for adding a new engine and all the associated tests.

@betodealmeida would you mind taking a look at this change as you seem to be the resident database expert.


## Doris

The [sqlalchemy-doris](https://pypi.org/project/pydoris/) library is the recommended
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The [sqlalchemy-doris](https://pypi.org/project/pydoris/) library is the recommended
The [sqlalchemy-doris](https://pypi.org/project/pydoris/) library is the recommended way to connect to Apache Doris through SQLAlchemy.

## Doris

The [sqlalchemy-doris](https://pypi.org/project/pydoris/) library is the recommended
way to connect to Apache Doris through SQLAlchemy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
way to connect to Apache Doris through SQLAlchemy.

setup.py Outdated
@@ -205,6 +205,7 @@ def get_git_sha() -> str:
"vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"],
"netezza": ["nzalchemy>=11.0.2"],
"starrocks": ["starrocks>=1.0.0"],
"doris": ["pydoris>=1.0.0"],
Copy link
Member

Choose a reason for hiding this comment

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

Could we include an upper bound of 2.0.0 to prevent potenitial breaking changes when the dependencies are bumped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will modify it, thanks for your suggestion

superset/db_engine_specs/doris.py Outdated Show resolved Hide resolved
@rusackas rusackas added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Nov 21, 2023
@rusackas rusackas requested review from michael-s-molina and removed request for ThreatLEVELred November 21, 2023 19:29
@rusackas
Copy link
Member

Thank you for adding this! We'll try to get it into Superset. 3.1 officially. Happy to continue supporting these integrations in the Apache ecosystem :)

@rusackas rusackas merged commit 9712146 into apache:master Nov 21, 2023
35 checks passed
@michael-s-molina michael-s-molina removed the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Dec 4, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
Co-authored-by: Evan Rusackas <evan@preset.io>
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
Co-authored-by: Evan Rusackas <evan@preset.io>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
Co-authored-by: Evan Rusackas <evan@preset.io>
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Co-authored-by: Evan Rusackas <evan@preset.io>
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/L 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants