Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/source/library-user-guide/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,35 @@ Users may need to update their paths to account for these changes.

See [issue #17713] for more details.

### `FileScanConfigBuilder` now uses `TableSchema` internally

The `FileScanConfigBuilder` has been refactored to use `TableSchema` directly instead of managing `file_schema` and `table_partition_cols` separately. This simplifies the builder's internal state management and makes the API more consistent.

**Impact:** This change is mostly internal and should not affect most users. The public API of `FileScanConfigBuilder` remains the same - you still use `with_table_partition_cols()` to set partition columns.

However, if you were directly constructing `FileScanConfigBuilder` from a `FileScanConfig` (via the `From` trait) or accessing its internal fields, you may need to update your code.

**Before:**

```rust,ignore
let builder = FileScanConfigBuilder {
file_schema: my_schema,
table_partition_cols: partition_cols,
...
};
```
Comment on lines +125 to +135
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a hallucination? Fields in FileScanConfigBuilder aren't public so users wouldn't be able to construct it manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup you're totally right, I thought they were hence making this PR. Seems like no breaking change :)


**After:**

```rust,ignore
let table_schema = TableSchema::new(my_schema, partition_cols);
let builder = FileScanConfigBuilder::new(url, table_schema, file_source);
```

See [#18231] for details.

[#18231]: https://github.com/apache/datafusion/pull/18231

## DataFusion `50.0.0`

### ListingTable automatically detects Hive Partitioned tables
Expand Down