Skip to content

Commit

Permalink
test: add test to verify that gzipped json file is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
timvw committed Mar 29, 2024
1 parent af3da58 commit 2b24454
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testing
22 changes: 22 additions & 0 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@ async fn run_with_local_ndjson_file() -> datafusion::common::Result<()> {
Ok(())
}

#[tokio::test]
async fn run_with_local_ndjson_gz_file() -> datafusion::common::Result<()> {
let mut cmd = get_qv_cmd()?;
let cmd = cmd.arg(get_qv_testing_path(
"data/json/ndjson-sample.json.gz",
))
.arg("-q")
.arg("SELECT url from tbl");

let header_predicate = build_row_regex_predicate(vec!["url"]);

let data_predicate = build_row_regex_predicate(vec![
"https://www.yelp.com/search",
]);

cmd.assert()
.success()
.stdout(header_predicate)
.stdout(data_predicate);
Ok(())
}

#[tokio::test]
async fn run_with_local_parquet_file() -> datafusion::common::Result<()> {
let mut cmd = get_qv_cmd()?;
Expand Down

0 comments on commit 2b24454

Please sign in to comment.