Skip to content

Commit

Permalink
Bump chrono-tz except for clickhouse
Browse files Browse the repository at this point in the history
Signed-off-by: Darach Ennis <darach@gmail.com>
  • Loading branch information
darach committed May 14, 2024
1 parent 4623e12 commit 9bb1e44
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
30 changes: 26 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions tremor-connectors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ clickhouse-rs = { version = "1.1.0-alpha.1", optional = true, default-features =
"tokio_io",
"tls",
] }
chrono-tz = { version = "0.8", optional = true, default-features = false }
# Clickhouse chrono-tz is out of date so we ringfence it here. Hopefully a new version will be released soon...
clickhouse-chrono-tz = { package = "chrono-tz", version = "0.8", optional = true, default-features = false }

# crononome
serde_yaml = { version = "0.9", optional = true, default-features = false }
Expand Down Expand Up @@ -208,12 +209,7 @@ tls = [
]

dns = ["dep:trust-dns-resolver"]
elasticsearch = [
"dep:elasticsearch",
"dep:serde_yaml",
"tls",
"http",
]
elasticsearch = ["dep:elasticsearch", "dep:serde_yaml", "tls", "http"]
http = [
"dep:base64",
"dep:dashmap",
Expand All @@ -239,7 +235,7 @@ file = ["dep:file-mode", "dep:async-compression"]
kv = ["dep:sled"]
wal = ["dep:qwal", "dep:simd-json-derive"]
bench = ["dep:xz2", "dep:hdrhistogram"]
clickhouse = ["dep:clickhouse-rs", "dep:chrono-tz", "dep:uuid"]
clickhouse = ["dep:clickhouse-rs", "dep:clickhouse-chrono-tz", "dep:uuid"]
crononome = ["dep:serde_yaml", "dep:chrono", "dep:cron"]
stdio = []
metronome = []
Expand Down
13 changes: 6 additions & 7 deletions tremor-connectors/src/impls/clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
mod conversion;

use crate::sink::prelude::*;
use clickhouse_chrono_tz::Tz;
use clickhouse_rs::{
errors::Error as CError,
types::{DateTimeType, SqlType},
Expand Down Expand Up @@ -598,17 +599,15 @@ impl From<&DummySqlType> for &'static SqlType {
DummySqlType::Ipv6 => SqlType::Ipv6,
DummySqlType::Uuid => SqlType::Uuid,
DummySqlType::DateTime => SqlType::DateTime(DateTimeType::DateTime32),
DummySqlType::DateTime64Secs => {
SqlType::DateTime(DateTimeType::DateTime64(0, chrono_tz::Tz::UTC))
}
DummySqlType::DateTime64Secs => SqlType::DateTime(DateTimeType::DateTime64(0, Tz::UTC)),
DummySqlType::DateTime64Millis => {
SqlType::DateTime(DateTimeType::DateTime64(3, chrono_tz::Tz::UTC))
SqlType::DateTime(DateTimeType::DateTime64(3, Tz::UTC))
}
DummySqlType::DateTime64Micros => {
SqlType::DateTime(DateTimeType::DateTime64(6, chrono_tz::Tz::UTC))
SqlType::DateTime(DateTimeType::DateTime64(6, Tz::UTC))
}
DummySqlType::DateTime64Nanos => {
SqlType::DateTime(DateTimeType::DateTime64(9, chrono_tz::Tz::UTC))
SqlType::DateTime(DateTimeType::DateTime64(9, Tz::UTC))
}
};

Expand Down Expand Up @@ -697,7 +696,7 @@ mod tests {
}

mod dummy_sql_type_into_sql_type {
use chrono_tz::Tz::UTC;
use Tz::UTC;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion tremor-connectors/src/impls/clickhouse/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use super::DummySqlType;
use chrono_tz::Tz;
use clickhouse_chrono_tz::Tz;
pub(super) use clickhouse_rs::types::Value as CValue;
use either::Either;
use std::{
Expand Down
4 changes: 2 additions & 2 deletions tremor-script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ atty = "0.2"
beef = { version = "0.5", features = ["impl_serde"] }
byteorder = "1"
chrono = "0.4"
chrono-tz = "0.8"
chrono-tz = "0.9"
cidr-utils = "0.6"
codespan = "0.11"
dissect = "0.7"
Expand Down Expand Up @@ -62,7 +62,7 @@ xz2 = "0.1"

[build-dependencies]
lalrpop = "0.20"
chrono-tz = "0.8"
chrono-tz = "0.9"

[dev-dependencies]
criterion = "0.5"
Expand Down

0 comments on commit 9bb1e44

Please sign in to comment.