Commit 4a41587
authored
## Which issue does this PR close?
*
[Comment](#20202 (comment))
on #20202
---
## Rationale for this change
The `custom_file_casts` example defines a *logical/table* schema that
uses `id: Int32` as the target type. In practice, casting and projection
paths in DataFusion can produce **nulls** (e.g. failed casts, missing
values, or intermediate expressions), and examples should avoid implying
that nulls are impossible when demonstrating casting behavior.
Marking the `id` field as **nullable** makes the example more realistic
and prevents confusion when users follow or adapt the example to
scenarios where nulls may appear.
---
## What changes are included in this PR?
* Update the logical/table schema in `custom_file_casts.rs` to define
`id` as **nullable** (`Field::new("id", DataType::Int32, true)`).
* Adjust the inline comment to reflect the nullable schema.
---
## Are these changes tested?
No new tests were added.
This is a documentation/example-only change that updates a schema
definition and comment. The example continues to compile and can be
exercised by running the `custom_file_casts` example as before.
---
## Are there any user-facing changes?
Yes (example behavior/expectations):
* The `custom_file_casts` example now documents `id` as nullable,
aligning the example schema with situations where cast/projection may
yield null values.
* No public APIs are changed and no breaking behavior is introduced.
1 parent 0dfa542 commit 4a41587
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments