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: upgrade sqlalchemy to 2.0.27 and updated test cases #3805

Merged
merged 3 commits into from Apr 7, 2024

Conversation

yht520100
Copy link
Collaborator

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    feature

  • What is the current behavior? (You can also link to an open issue here)

  • Support SQLAlchemy 2.x for Python SDK #1281
    The current version of SQLAlchemy being used is 1.4.50, which supports relatively older versions.

  • What is the new behavior (if this is a feature change)?
    Upgrade SQLAlchemy to 2.0.27 and updated relevant test cases.
    Testing has confirmed that dbapi.py is compatible with both SQLAlchemy 1.4 and 2.0 versions, allowing users to adjust compilation as needed.

@github-actions github-actions bot added documentation Improvements or additions to documentation sdk openmldb java/python sdk labels Mar 14, 2024
Copy link
Contributor

github-actions bot commented Mar 14, 2024

SDK Test Report

101 files  ±0  101 suites  ±0   2m 15s ⏱️ +7s
349 tests +2  335 ✅ +2  14 💤 ±0  0 ❌ ±0 
475 runs  +2  461 ✅ +2  14 💤 ±0  0 ❌ ±0 

Results for commit 7ea6d1e. ± Comparison against base commit db1c1f8.

This pull request removes 48 and adds 29 tests. Note that renamed tests count towards both.
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)
 ) limit 10;](2)
 ) limit 10;](3)
 FROM db1.t1
 FROM t1
 WINDOW w1 AS (
 last join db2.t2 order by db2.t2.col1
…
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[,  SELECT sum(db1.t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM db1.t1
 last join db2.t2 order by db2.t2.col1
 on db1.t1.col1 = db2.t2.col1 and db1.t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](2)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[db1,  SELECT sum(t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[null,  SELECT sum(db1.t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM db1.t1
 last join db2.t2 order by db2.t2.col1
 on db1.t1.col1 = db2.t2.col1 and db1.t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](3)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Fail to transform data provider op: table t1 not exists in database []](4)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT db1.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: db1.t2.str1](2)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: .t2.col1](3)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: .t2.str1](1)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[null, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Fail to transform data provider op: table t1 not exists in database []](5)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlWindowLastJoin[ SELECT sum(t1.col1) over w1 as sum_t1_col1, t2.str1 as t2_str1
 FROM t1
 last join t2 order by t2.col1
 on t1.col1 = t2.col1 and t1.col2 = t2.col0
 WINDOW w1 AS (
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)
com._4paradigm.openmldb.batch.TestProjectPlan ‑ Test const project
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Mar 14, 2024

Linux Test Report

 53 files  ±0   60 suites  ±0   28m 2s ⏱️ +11s
671 tests ±0  651 ✅ ±0  7 💤 ±0  13 ❌ ±0 
672 runs  ±0  652 ✅ ±0  7 💤 ±0  13 ❌ ±0 

For more details on these failures, see this check.

Results for commit 7ea6d1e. ± Comparison against base commit db1c1f8.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 91.42857% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 40.75%. Comparing base (7f1bd83) to head (7ea6d1e).
Report is 32 commits behind head on main.

Files Patch % Lines
python/openmldb_sdk/tests/sqlalchemy_api_test.py 71.42% 2 Missing ⚠️
python/openmldb_sdk/tests/openmldb_client_test.py 96.42% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #3805       +/-   ##
=============================================
- Coverage     74.93%   40.75%   -34.18%     
  Complexity      658      658               
=============================================
  Files           738      195      -543     
  Lines        133155    11655   -121500     
  Branches       1380     1379        -1     
=============================================
- Hits          99779     4750    -95029     
+ Misses        33072     6601    -26471     
  Partials        304      304               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@tobegit3hub tobegit3hub left a comment

Choose a reason for hiding this comment

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

LGTM

@yht520100
Copy link
Collaborator Author

The error content of cicd is not caused by the current PR commit. Now apply for manual merge.

@yht520100
Copy link
Collaborator Author

The error content of cicd is not caused by the current PR commit. Now apply for manual merge.

@yht520100 yht520100 merged commit 0cef78a into 4paradigm:main Apr 7, 2024
21 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation sdk openmldb java/python sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants