Skip to content

fix: describe distribute table#988

Merged
MichaelScofield merged 2 commits intoGreptimeTeam:developfrom
MichaelScofield:fix/desc-dist-table
Feb 15, 2023
Merged

fix: describe distribute table#988
MichaelScofield merged 2 commits intoGreptimeTeam:developfrom
MichaelScofield:fix/desc-dist-table

Conversation

@MichaelScofield
Copy link
Copy Markdown
Collaborator

@MichaelScofield MichaelScofield commented Feb 14, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Fix a bug that DESC table is not working correctly for distribute table when primary keys are defined in column options.

Also:

  • refactor some error msgs to make them more clear
  • unify sqlness test case for creating table

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

close #923

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2023

Codecov Report

Merging #988 (3282038) into develop (9ad6c45) will decrease coverage by 0.03%.
The diff coverage is 81.57%.

@@             Coverage Diff             @@
##           develop     #988      +/-   ##
===========================================
- Coverage    85.99%   85.96%   -0.03%     
===========================================
  Files          431      432       +1     
  Lines        61557    62521     +964     
===========================================
+ Hits         52934    53748     +814     
- Misses        8623     8773     +150     
Flag Coverage Δ
rust 85.96% <81.57%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
src/frontend/src/expr_factory.rs 91.42% <76.66%> (-4.15%) ⬇️
src/datanode/src/sql/create.rs 91.04% <100.00%> (ø)
src/object-store/src/test_util.rs 0.00% <0.00%> (-100.00%) ⬇️
src/storage/src/compaction/task.rs 7.47% <0.00%> (-59.20%) ⬇️
src/datanode/src/instance.rs 41.56% <0.00%> (-14.91%) ⬇️
src/storage/src/compaction/picker.rs 26.53% <0.00%> (-11.71%) ⬇️
tests-integration/src/test_util.rs 79.47% <0.00%> (-9.33%) ⬇️
src/storage/src/compaction/dedup_deque.rs 75.47% <0.00%> (-7.87%) ⬇️
src/storage/src/read.rs 89.88% <0.00%> (-2.97%) ⬇️
src/servers/src/auth/user_provider.rs 81.81% <0.00%> (-2.28%) ⬇️
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Is this bug only occur in a distributed table? Looks like find_primary_keys() also affects other modes.

Comment thread src/frontend/src/expr_factory.rs Outdated
Comment thread tests/cases/standalone/order/order_variable_size_payload.sql Outdated
@MichaelScofield
Copy link
Copy Markdown
Collaborator Author

find_primary_keys is only called in distributed table creation code path, so this bug only exists in distribute mode. Other comments are resolved, PTAL @waynexia

@MichaelScofield MichaelScofield merged commit 5533040 into GreptimeTeam:develop Feb 15, 2023
@MichaelScofield MichaelScofield deleted the fix/desc-dist-table branch February 15, 2023 09:48
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

column constrain PRIMARY KEY doesn't take efforts when placed after column's definition

3 participants