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: support custom order in insert stmt #2075

Merged

Conversation

vagetablechicken
Copy link
Collaborator

Closes #2059

@github-actions github-actions bot added sdk openmldb java/python sdk storage-engine openmldb storage engine. nameserver & tablet labels Jul 5, 2022
@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #2075 (0a49be2) into main (d5a6a1f) will increase coverage by 0.11%.
The diff coverage is 71.68%.

❗ Current head 0a49be2 differs from pull request most recent head 791271d. Consider uploading reports for the commit 791271d to get more accurate results

@@             Coverage Diff              @@
##               main    #2075      +/-   ##
============================================
+ Coverage     75.69%   75.80%   +0.11%     
- Complexity      347      354       +7     
============================================
  Files           615      616       +1     
  Lines        116901   117102     +201     
  Branches       1015     1029      +14     
============================================
+ Hits          88484    88766     +282     
+ Misses        28208    28125      -83     
- Partials        209      211       +2     
Impacted Files Coverage Δ
...main/java/com/_4paradigm/openmldb/common/Pair.java 40.00% <40.00%> (ø)
src/sdk/sql_insert_row.cc 65.53% <55.55%> (+0.26%) ⬆️
src/sdk/sql_insert_row.h 55.00% <70.00%> (+15.00%) ⬆️
src/sdk/sql_cluster_router.cc 55.35% <70.58%> (+0.42%) ⬆️
...om/_4paradigm/openmldb/jdbc/SQLInsertMetaData.java 39.58% <83.33%> (+2.08%) ⬆️
...openmldb/sdk/impl/InsertPreparedStatementImpl.java 42.07% <94.11%> (+1.34%) ⬆️
python/test/dbapi_test.py 97.82% <100.00%> (+0.20%) ⬆️
src/sdk/sql_cluster_router.h 85.71% <100.00%> (+2.38%) ⬆️
src/sdk/db_sdk.cc 63.45% <0.00%> (-4.27%) ⬇️
src/rpc/rpc_client.h 89.18% <0.00%> (-1.36%) ⬇️
... and 54 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 d5a6a1f...791271d. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

SDK Test Report

  75 files    75 suites   7m 50s ⏱️
165 tests 163 ✔️ 2 💤 0
206 runs  204 ✔️ 2 💤 0

Results for commit 0a49be2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

Linux Test Report

       55 files       200 suites   52m 45s ⏱️
  9 227 tests   9 223 ✔️ 4 💤 0
13 578 runs  13 574 ✔️ 4 💤 0

Results for commit 0a49be2.

♻️ This comment has been updated with latest results.

@vagetablechicken vagetablechicken marked this pull request as ready for review July 6, 2022 03:17
src/sdk/sql_insert_row.h Outdated Show resolved Hide resolved
@@ -48,7 +50,8 @@ public class InsertPreparedStatementImpl implements PreparedStatement {
private final List<Object> currentDatas;
private final List<DataType> currentDatasType;
private final List<Boolean> hasSet;
private final List<Integer> scehmaIdxs;
// stmt insert idx -> real table schema idx
private final List<Pair<Long, Integer>> schemaIdxes;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the first type of pair is the same as second. set as Integer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

uint32 is long, and idx type of list is int, no the same.

@vagetablechicken vagetablechicken enabled auto-merge (squash) July 8, 2022 06:16
@vagetablechicken vagetablechicken merged commit 053c4e3 into 4paradigm:main Jul 8, 2022
@lumianph
Copy link
Collaborator

lumianph commented Aug 9, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk openmldb java/python sdk storage-engine openmldb storage engine. nameserver & tablet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: SQLInsertRow should be consistent with insert sql(custom column order)
4 participants