Move `tempfile` crate to dev dependencies in datafusion core crate
- Ngôn ngữ chính
- Rust
- Star
- 9.3k
- Fork
- 2.4k
- Merge trung bình
- 3 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 360
Mô tả
### Is your feature request related to a problem or challenge?
`tempfile` crate is currently included as a normal dependency in the `datafusion` crate. It would be possible to move the dependency to the `dev-dependencies` since the `tempfile` capabilities are only used by integration and unit tests.
Specifically, the following function:
```
/// Generate CSV partitions within the supplied directory
pub fn populate_csv_partitions(
tmp_dir: &TempDir,
partition_count: usize,
file_extension: &str,
) -> Result {
...
```
It is the only one that uses `tempfile` capabilities.
### Describe the solution you'd like
It would be possible to move the `tempfile` crate from `dependencies` to `dev-dependencies` by decorating the `populate_csv_partitions` with the `#[cfg(test)]` attribute and replicating the function where needed in the integration tests (i.e.: `datafusion/core/tests/dataframe/mod.rs`)
### Describe alternatives you've considered
_No response_
### Additional context
I'm opening this as a feature request since it's not an actual bug.
Hướng dẫn đóng góp
Hướng nghiên cứu
Xác định các khai báo dependency của datafusion core crate và mọi chỗ sử dụng populate_csv_partitions, sau đó kiểm tra datafusion/core/tests/dataframe/mod.rs để tìm helper cho integration test. Xác nhận rằng tempfile chỉ cần cho các test, chuyển nó vào tập dependency của test và đảm bảo các unit test và integration test vẫn biên dịch và chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- build-system, testing
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100