-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add builder style APIs For Field
: with_name
, with_data_type
and with_nullable
#2024
Conversation
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
with_name
, with_data_type
and with_nullable
to Field
Field
: with_name
, with_data_type
and with_nullable
Codecov Report
@@ Coverage Diff @@
## master #2024 +/- ##
==========================================
- Coverage 83.42% 83.41% -0.02%
==========================================
Files 222 222
Lines 57906 57915 +9
==========================================
+ Hits 48306 48307 +1
- Misses 9600 9608 +8
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Nit: It seems like the 3 methods are not covered in the Codecov
result, although they have been tested by docs.
Related to #1091 |
Which issue does this PR close?
Closes #1934
Rationale for this change
The lack of such an API caused me consternation in apache/datafusion#2803 and https://github.com/influxdata/influxdb_iox/pull/5021
Basically I want to be able to change a field's nullability like
But instead I have to do something like
What changes are included in this PR?
Field::with_name
Field::with_data_type
Field::with_nullability
Are there any user-facing changes?
yes, new APIs and better docs