-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
docs: Fix Rust examples in user guide #20075
base: main
Are you sure you want to change the base?
Conversation
@@ -17,8 +17,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | |||
.clone() | |||
.lazy() | |||
.select([ | |||
(col("nrs") + lit(5)).alias("nrs + 5"), | |||
(col("nrs") - lit(5)).alias("nrs - 5"), | |||
(col("nrs") + lit(5).cast(DataType::Int32)).alias("nrs + 5"), |
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.
I think this should be typed_lit
, but what is the failure here?
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.
without the cast, the error is:
SchemaMismatch: failed to determine supertype of i32 and dyn int
I may be wrong, but it doesn't look like typed_lit
is exposed.
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.
actually, the cast is not needed. This example required the dtype-i8
feature as materialize_smallest_dyn_int
ends up converting to i8
.
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.
@ritchie46 this is an issue I've encountered and luke's conclusion is correct/what you folks told me: that I needed the feature dtype-i8
but that something needed fixing because it wasn't supposed to require a feature.
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.
@ritchie46 this is an issue I've encountered and luke's conclusion is correct/what you folks told me: that I needed the feature
dtype-i8
but that something needed fixing because it wasn't supposed to require a feature.
I opened #20108 which adds a feature gate around i8/i16 (u8/u16) in order to allow this example to run without additional features.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20075 +/- ##
==========================================
- Coverage 79.53% 79.52% -0.01%
==========================================
Files 1563 1563
Lines 217124 217124
Branches 2464 2464
==========================================
- Hits 172680 172678 -2
- Misses 43884 43886 +2
Partials 560 560 ☔ View full report in Codecov by Sentry. |
Adds required features and fixes a few broken examples in the user guide.