Skip to content

Commit

Permalink
Better support for parsing date-related data types from ClickHouse
Browse files Browse the repository at this point in the history
- Support parsing timezones out of `DateTime` and `DateTime64` types,
  and add support for `Date` type.
- Switch to using `nom` for more robust parsing of these types.
- Fix bug in block concatenation, where we concatenated rows but didn't
  update the contained row count. Add regression test.
- Add a new USDT probe for data packets specifically, with size and
  column names / types
  • Loading branch information
bnaecker committed Oct 14, 2024
1 parent 6fb91c6 commit 4bdd53e
Show file tree
Hide file tree
Showing 9 changed files with 696 additions and 409 deletions.
729 changes: 389 additions & 340 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ cargo_metadata = "0.18.1"
chacha20poly1305 = "0.10.1"
cfg-if = "1.0"
chrono = { version = "0.4", features = [ "serde" ] }
chrono-tz = "0.10.0"
ciborium = "0.2.2"
clap = { version = "4.5", features = ["cargo", "derive", "env", "wrap_help"] }
clickhouse-admin-api = { path = "clickhouse-admin/api" }
Expand Down Expand Up @@ -398,6 +399,7 @@ hyper-util = "0.1.9"
hyper-rustls = "0.26.0"
hyper-staticfile = "0.10.0"
illumos-utils = { path = "illumos-utils" }
iana-time-zone = "0.1.61"
indent_write = "2.2.0"
indexmap = "2.6.0"
indicatif = { version = "0.17.8", features = ["rayon"] }
Expand Down
3 changes: 3 additions & 0 deletions oximeter/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ async-trait.workspace = true
bcs.workspace = true
camino.workspace = true
chrono.workspace = true
chrono-tz.workspace = true
clap.workspace = true
clickward.workspace = true
dropshot.workspace = true
futures.workspace = true
gethostname.workspace = true
highway.workspace = true
iana-time-zone.workspace = true
libc.workspace = true
nom.workspace = true
num.workspace = true
omicron-common.workspace = true
omicron-workspace-hack.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion oximeter/db/src/bin/oxdb/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ async fn main() -> anyhow::Result<()> {
.await?
}
#[cfg(feature = "native-sql")]
Subcommand::NativeSql => oximeter_db::shells::native::shell().await?,
Subcommand::NativeSql => {
oximeter_db::shells::native::shell(args.address).await?
}
}
Ok(())
}
Loading

0 comments on commit 4bdd53e

Please sign in to comment.