2010YOUY01 opened a new pull request, #7058:
URL: https://github.com/apache/arrow-datafusion/pull/7058
# Which issue does this PR close?
NA
# Rationale for this change
It is more convenient to use shell expansion for paths when reading files,
it is not supported now (standard path library doesn't support that)
```sql
arrow-datafusion/datafusion-cli|shell-expand🌝| >>> export
CSV_FILE=aggregate_test_100.csv
arrow-datafusion/datafusion-cli|shell-expand🌝| >>> cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.75s
Running `target/debug/datafusion-cli`
DataFusion CLI v27.0.0
❯ CREATE EXTERNAL TABLE aggr
STORED AS CSV
WITH HEADER ROW LOCATION '~/db_data/datafusion/data/csv/$CSV_FILE';
0 rows in set. Query took 0.101 seconds.
❯ select c1, max(c12) from aggr group by c1;
+----+--------------------+
| c1 | MAX(aggr.c12) |
+----+--------------------+
| c | 0.991517828651004 |
| d | 0.9748360509016578 |
| b | 0.9185813970744787 |
| a | 0.9800193410444061 |
| e | 0.9965400387585364 |
+----+--------------------+
```
# What changes are included in this PR?
Expand paths when necessary.
The implementation directly uses the shell to expand paths, I found this way
easy and also avoids external dependencies.
# Are these changes tested?
Yes
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are
they covered by existing tests)?
-->
# Are there any user-facing changes?
No
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]