Skip to content

Commit 1ee79a3

Browse files
committed
add tests to check support for querying all columns including project_id column
1 parent 8f8647d commit 1ee79a3

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ bytes = "1.4"
2929
tokio-rustls = "0.26.1"
3030
sled = "0.34.7"
3131
actix-web = "4.9.0"
32-
datafusion-postgres = { git = "https://github.com/apitoolkit/FusionGate.git" }
32+
# datafusion-postgres = { git = "https://github.com/apitoolkit/FusionGate.git" }
33+
datafusion-postgres = { git = "https://github.com/apitoolkit/datafusion-postgres.git", branch = "interpret-dictionary-types" }
34+
# datafusion-postgres = { path = "../datafusion-projects/datafusion-postgres/datafusion-postgres/" }
3335
datafusion-functions-json = "0.46.0"
3436
anyhow = "1.0.95"
3537
tokio-util = "0.7.13"

tests/integration_test.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ mod integration {
147147
let count_rows = client.query("SELECT COUNT(*) FROM otel_logs_and_spans WHERE project_id = $1", &[&"test_project"]).await?;
148148
assert_eq!(count_rows[0].get::<_, i64>(0), 6, "Should have a total of 6 records (1 initial + 5 batch)");
149149

150+
let count_rows = client.query("SELECT project_id FROM otel_logs_and_spans WHERE project_id = $1", &[&"test_project"]).await?;
151+
assert_eq!(count_rows[0].get::<_, String>(0), "test_project", "project_id should match");
152+
150153
let count_rows = client.query("SELECT * FROM otel_logs_and_spans WHERE project_id = $1", &[&"test_project"]).await?;
151-
assert_eq!(count_rows[0].get::<_, i64>(0), 6, "Should have a total of 6 records (1 initial + 5 batch)");
154+
assert_eq!(count_rows[0].columns().len(), 80, "Should return all 80 columns");
152155

153156
Ok::<_, tokio_postgres::Error>(())
154157
}

0 commit comments

Comments
 (0)