apache / apache/datafusion

Move `tempfile` crate to dev dependencies in datafusion core crate

オープン
#17,522 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Rust
スター
9.3k
フォーク
2.4k
平均マージ
3日 11時間
マージ済み PR(30日)
362

説明

### 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

datafusion core crate の依存関係宣言と populate_csv_partitions のすべての使用箇所を特定し、その後 datafusion/core/tests/dataframe/mod.rs を調べて統合テスト用のヘルパーを確認します。tempfile がテストでのみ必要であることを確認し、テスト依存関係のセットに移動して、ユニットテストと統合テストが引き続きコンパイルされ、成功することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
build-system, testing
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。