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 auto create table config #713

Merged

Conversation

MichaelLeeHZ
Copy link
Contributor

Which issue does this PR close?

Closes #

Rationale for this change

Currently CeresDB create table automatically when writing data, if table does not exist, the time column is named as 'timestamp' which may not be not the same as user defined

What changes are included in this PR?

Add config item of auto_create_tables

Are there any user-facing changes?

User can configure `auto_create_tables' to allow the automatic creation of tables when writing data.

How does this change test

@MichaelLeeHZ MichaelLeeHZ marked this pull request as ready for review March 9, 2023 03:23
.gitignore Outdated Show resolved Hide resolved
server/src/config.rs Outdated Show resolved Hide resolved
server/src/config.rs Outdated Show resolved Hide resolved
server/src/grpc/storage_service/write.rs Show resolved Hide resolved
Co-authored-by: Jiacai Liu <dev@liujiacai.net>
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2023

Codecov Report

Merging #713 (6475c08) into main (11f10c2) will decrease coverage by 0.23%.
The diff coverage is 40.28%.

❗ Current head 6475c08 differs from pull request most recent head c26ab60. Consider uploading reports for the commit c26ab60 to get more accurate results

@@            Coverage Diff             @@
##             main     #713      +/-   ##
==========================================
- Coverage   68.35%   68.12%   -0.23%     
==========================================
  Files         286      287       +1     
  Lines       44762    45161     +399     
==========================================
+ Hits        30596    30765     +169     
- Misses      14166    14396     +230     
Impacted Files Coverage Δ
server/src/config.rs 37.64% <0.00%> (-0.45%) ⬇️
server/src/grpc/mod.rs 0.00% <0.00%> (ø)
server/src/grpc/storage_service/mod.rs 0.00% <0.00%> (ø)
server/src/grpc/storage_service/write.rs 37.32% <0.00%> (-1.67%) ⬇️
server/src/handlers/error.rs 0.00% <ø> (ø)
server/src/handlers/prom.rs 68.44% <0.00%> (-0.17%) ⬇️
server/src/handlers/query.rs 0.00% <0.00%> (ø)
server/src/http.rs 0.00% <0.00%> (ø)
server/src/mysql/worker.rs 0.00% <0.00%> (ø)
server/src/server.rs 0.00% <0.00%> (ø)
... and 14 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
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 added this pull request to the merge queue Mar 10, 2023
Merged via the queue into apache:main with commit 1291db2 Mar 10, 2023
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* support auto create config

* Update server/src/config.rs

Co-authored-by: Jiacai Liu <dev@liujiacai.net>

* define a new struct

---------

Co-authored-by: Jiacai Liu <dev@liujiacai.net>
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.

4 participants