alamb commented on code in PR #26934:
URL: https://github.com/apache/datafusion/pull/26934#discussion_r4651828969
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1894,6 +1896,77 @@ impl SessionContext {
.build()?,
))
}
+
+ /// Create a [`DataFrame`] from named Arrow arrays.
+ ///
+ /// Each `(name, array)` pair becomes one column. The field's nullability
+ /// is derived from the array: a column is non-nullable when its array is
+ /// guaranteed to contain no nulls (see [`Array::is_nullable`]), which lets
+ /// the optimizer simplify expressions such as `col IS NULL` on it.
+ ///
+ /// The arrays are wrapped in a single [`RecordBatch`] and read through
+ /// [`Self::read_batch`], so the returned `DataFrame` runs in this session
+ /// and sees its registered functions, tables, configuration and runtime,
+ /// exactly like a `DataFrame` created with [`Self::read_batch`].
+ ///
+ /// The session state is captured when the `DataFrame` is created:
functions
Review Comment:
I don't understand this comment -- it returns a Dataframe (which has a
session state in it), why would registering a function afterwards not appear?
This is probably referring to the fact that modifing the *original*
dataframe doesn't affect the child
However, that is the same for all such dataframe methods. I think it is
confusing to call it out specially in read_batches
--
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]