Skip to content

[SPARK-11319][SQL] Making StructField's nullable field documentation clearer #11785

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import org.json4s.JsonDSL._
* A field inside a StructType.
* @param name The name of this field.
* @param dataType The data type of this field.
* @param nullable Indicates if values of this field can be `null` values.
* @param nullable Indicates if values of this field can be `null` values. Note that this is ONLY A HINT to the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @marmbrus's comment here this is actually much stronger than a hint:

Fair, this is a contract with the optimizer that you will not produce null data. If you are not certain you will not produce null values then set this to true.

* optimiser, the calling code is responsible for ensuring that there is no null. It is NOT
* a constraint that will be checked by the engine.
* @param metadata The metadata of this field. The metadata should be preserved during
* transformation if the content of the column is not modified, e.g, in selection.
*/
Expand Down