cj-zhukov commented on code in PR #24633:
URL: https://github.com/apache/datafusion/pull/24633#discussion_r3883251693
##########
datafusion/core/src/dataframe/mod.rs:
##########
@@ -2628,17 +2628,20 @@ impl DataFrame {
/// # Ok(())
/// # }
/// ```
- pub fn from_columns(columns: Vec<(&str, ArrayRef)>) -> Result<Self> {
- let fields = columns
- .iter()
- .map(|(name, array)| Field::new(*name, array.data_type().clone(),
true))
- .collect::<Vec<_>>();
-
- let arrays = columns
+ pub fn from_columns<I, S>(columns: I) -> Result<Self>
Review Comment:
Thanks for pointing this out. I agree, this makes sense.
I don't want this PR to introduce any breaking changes. The goal is to
extend the existing API to also support arrays while keeping the current
`Vec<(&str, ArrayRef)>` usage fully compatible.
I'll rework the implementation to preserve the existing API and avoid the
type inference issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]