Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottLinnn committed May 1, 2024
1 parent 70f3379 commit 38e2176
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ readme = "README.md"
include = [
"src/client_api.rs",
"src/storage_client.rs",
"src/lib.rs"
"src/lib.rs",
"src/benchmark.rs"
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -29,3 +30,7 @@ env_logger = "0.11.1"
async-trait = "0.1"
rocket = { version = "0.5.0", features = ["json"] }
reqwest = { version = "0.11", features = ["stream", "json"] }

[[bin]]
name = "benchmark"
path = "src/benchmark.rs"
6 changes: 4 additions & 2 deletions client/src/storage_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ impl StorageClientImpl {
}

pub fn local_cache_path() -> String {
String::from("./istziio_client_cache/")
let home = std::env::var("HOME").unwrap();
String::from(home + "/istziio_client_cache/")
}

/// Fetch all data of a table, call get_path() to get the file name that stores the table
Expand Down Expand Up @@ -212,11 +213,12 @@ impl StorageClientImpl {
// print curr time
let start = std::time::Instant::now();
local_path.push_str(file_path);
print!(
println!(
"read_pqt_all_sync Reading from local_path: {:?}",
local_path
);
let file = File::open(local_path)?;
println!("File opened");
let builder = ParquetRecordBatchReaderBuilder::try_new(file)?;
let mut reader = builder.build()?;
let mut result: Vec<RecordBatch> = Vec::new();
Expand Down

0 comments on commit 38e2176

Please sign in to comment.