mqy commented on a change in pull request #8996:
URL: https://github.com/apache/arrow/pull/8996#discussion_r548537221
##########
File path: rust/parquet/src/util/test_common/file_util.rs
##########
@@ -19,17 +19,8 @@ use std::{env, fs, io::Write, path::PathBuf, str::FromStr};
/// Returns path to the test parquet file in 'data' directory
pub fn get_test_path(file_name: &str) -> PathBuf {
- let mut pathbuf = match env::var("PARQUET_TEST_DATA") {
- Ok(path) => PathBuf::from_str(path.as_str()).unwrap(),
- Err(_) => {
- let mut pathbuf = env::current_dir().unwrap();
- pathbuf.pop();
- pathbuf.pop();
- pathbuf
-
.push(PathBuf::from_str("cpp/submodules/parquet-testing/data").unwrap());
- pathbuf
- }
- };
+ let mut pathbuf =
+
PathBuf::from_str(&arrow::util::test_util::parquet_test_data()).unwrap();
Review comment:
+1 for the first choice right now. Perhaps these functions should stay
in a top crate parallel to arrow crate, as common utilities for testing or
something else. We may create that crate later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]