Skip to content

Commit

Permalink
chore: bump the version and adjust the building profile (#344)
Browse files Browse the repository at this point in the history
* chore: bump the version and adjust the building profile

* chore: remove redundent options in the profile.release
  • Loading branch information
ShiKaiWi authored Oct 27, 2022
1 parent 6fc8758 commit 0a59443
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
19 changes: 6 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "ceresdb"
version = "0.4.0-alpha"
version = "0.4.0"
authors = ["CeresDB Authors <[email protected]>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.package]
version = "0.4.0-alpha"
version = "0.4.0"
authors = ["CeresDB Authors <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -137,19 +137,12 @@ vergen = { version = "5", default-features = false, features = ["build", "git"]
[profile.bench]
debug = true

# This profile optimizes for runtime performance and small binary size at the expense of longer
# build times. It's most suitable for final release builds.
# This profile optimizes for good runtime performance.
[profile.release]
debug = true
opt-level = "z"
lto = true
overflow-checks = true

# This profile optimizes for short build times at the expense of larger binary size and slower
# runtime performance. It's most suitable for development iterations.
[profile.quick-release]
# This profile optimizes for best runtime performance but with more memory consumption.
[profile.better-release]
inherits = "release"
opt-level = 2
lto = false
codegen-units = 16
incremental = true
lto = true
10 changes: 5 additions & 5 deletions sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub enum Error {
#[snafu(display(
"Table must contain only one timestamp key and it's data type must be TIMESTAMP"
))]
InvalidTimetampKey,
InvalidTimestampKey,

#[snafu(display("Invalid unsign type: {}.\nBacktrace:\n{}", kind, backtrace))]
InvalidUnsignType {
Expand Down Expand Up @@ -345,7 +345,7 @@ impl<'a, P: MetaProvider> PlannerDelegate<'a, P> {
}
);

// Find timestamp key and primary key contraint
// Find timestamp key and primary key constraint.
let mut primary_key_constraint_idx = None;
let mut timestamp_name = None;
for (idx, constraint) in stmt.constraints.iter().enumerate() {
Expand All @@ -359,9 +359,9 @@ impl<'a, P: MetaProvider> PlannerDelegate<'a, P> {
primary_key_constraint_idx = Some(idx);
} else if parser::is_timestamp_key_constraint(constraint) {
// Only one timestamp key constraint
ensure!(timestamp_name.is_none(), InvalidTimetampKey);
ensure!(timestamp_name.is_none(), InvalidTimestampKey);
// Only one column in constraint
ensure!(columns.len() == 1, InvalidTimetampKey);
ensure!(columns.len() == 1, InvalidTimestampKey);

let name = &columns[0].value;
let timestamp_column = name_column_map
Expand All @@ -370,7 +370,7 @@ impl<'a, P: MetaProvider> PlannerDelegate<'a, P> {
// Ensure type is timestamp
ensure!(
timestamp_column.data_type == DatumKind::Timestamp,
InvalidTimetampKey
InvalidTimestampKey
);

timestamp_name = Some(name.clone());
Expand Down

0 comments on commit 0a59443

Please sign in to comment.