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

Incorporate the memory improvements of delta-rs 0.22.x #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lambdas/query-metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "query-metrics"
version = "0.4.0"
version = "0.5.0"
edition = "2021"

[[bin]]
Expand All @@ -18,8 +18,9 @@ aws-sdk-cloudwatch = "1.11.0"
aws-sdk-config = "1.11.0"
aws_lambda_events = { version = "0.12.0" }
base64 = "0.21.7"
deltalake-core = { version = "0.19.0", features = ["datafusion"] }
deltalake-aws = { version = "0.1.4" }
deltalake-core = { version = "0.22.3", features = ["datafusion"] }
deltalake-aws = { version = "0.5.0" }
datafusion-functions-json = "0.43.0"

lambda_runtime = "0.8.3"
serde = { version = "1.0.195", features = ["derive"] }
Expand Down
6 changes: 4 additions & 2 deletions lambdas/query-metrics/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ async fn main() -> anyhow::Result<()> {
for (name, gauges) in conf.gauges.iter() {
for gauge in gauges.iter() {
println!("Querying the {name} table");
let ctx = SessionContext::new();
let mut ctx = SessionContext::new();
datafusion_functions_json::register_all(&mut ctx)?;

let table = deltalake_core::open_table(&gauge.url)
.await
.expect("Failed to register table");
Expand All @@ -48,7 +50,7 @@ async fn main() -> anyhow::Result<()> {
println!("Counted {count} rows");
}
config::Measurement::Numeric => {
println!("Need to run dimensional count");
println!("Need to run numeric count");
let batches = df.collect().await.expect("Failed to collect batches");
let _ = print_batches(&batches);

Expand Down
Loading