cj-zhukov commented on code in PR #26934:
URL: https://github.com/apache/datafusion/pull/26934#discussion_r4640457984


##########
docs/source/library-user-guide/upgrading/56.0.0.md:
##########
@@ -732,6 +732,38 @@ Most existing call sites using `Vec` require no changes. 
Code that relies on
 the exact non-generic function signature of `DataFrame::from_columns` may need
 to be updated to account for the new generic API.
 
+### `DataFrame::from_columns` is deprecated in favor of 
`SessionContext::read_columns`
+
+`DataFrame::from_columns` creates a new default `SessionContext` internally, so
+the returned `DataFrame` cannot see functions, tables, configuration or runtime
+settings registered on the caller's own session. It is deprecated starting in
+56.0.0.
+
+Use the new `SessionContext::read_columns` instead, which builds the same
+`DataFrame` inside an existing session, like `read_batch` does.
+
+**Migration guide:**
+
+```rust,ignore
+// Before
+let df = DataFrame::from_columns([("id", id), ("name", name)])?;
+
+// After
+let df = ctx.read_columns([("id", id), ("name", name)])?;
+```
+
+### `DataFrame`s built from arrays derive field nullability from the data
+
+`SessionContext::read_columns`, `DataFrame::from_columns` and the `dataframe!`
+macro now mark a field as nullable only when its array may contain nulls
+(`Array::is_nullable`). Previously every field was nullable. This matches
+`RecordBatch::try_from_iter` and lets the optimizer simplify expressions such
+as `col IS NULL` on columns without nulls.
+
+Code that compares the resulting schema against a hand-written one with
+`nullable: true` for every field needs to be updated. Query results are
+unchanged.

Review Comment:
   I agree, I'll do it



-- 
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]

Reply via email to