mqy opened a new pull request #8964:
URL: https://github.com/apache/arrow/pull/8964
Facts/problems:
1. Two env vars ARROW_TEST_DATA and PARQUET_TEST_DATA are required to be
set, for running tests, benchmarks, examples.
2. There are totally eighteen .rs files using these environment variables.
3. The major usage likes this: ```let testdata =
std::env::var("PARQUET_TEST_DATA").expect("PARQUET_TEST_DATA not defined");```
4. Somebody tried to assembly the test data directories by appending
relative dir to current dir of current running process, but that MAY highly
depend on the actual current dir (for example, rust/, rust/datafusion, etc.).
Here is my solution:
Suppose:
1. current_dir is ALWAYS inside the git workspace dir
2. We know an data dir X relative to git workspace dir
Get absolute dir of X == get absolute dir of git workspace dir.
Given current dir (in git workspace dir),we visit the dir and it's parents,
check if ."git" (file or dir)exists. The first dir that contains ".git" SHOULD
be git workspace dir.
----------------------------------------------------------------
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]