Skip to content

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

Closed
francoisprunier wants to merge 2 commits into
apache:masterfrom
francoisprunier:StructFieldNullableDoc
Closed

[SPARK-11319][SQL] Making StructField's nullable field documentation clearer#11785
francoisprunier wants to merge 2 commits into
apache:masterfrom
francoisprunier:StructFieldNullableDoc

Conversation

@francoisprunier

Copy link
Copy Markdown

What changes were proposed in this pull request?

Be more descriptive in what the nullable field of StructField is intended for. At the moment, the description does not explain that it's only a hint to the optimizer, and many people are mistakenly thinking that this is a "NOT NULL" type constraint. Making it clear in the doc should help people understand its purpose.

How was this patch tested?

Not tested as it's only documentation

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@kevincox

Copy link
Copy Markdown
Contributor

👍

@blrnw3

Copy link
Copy Markdown

👍Agreed, it's very confusing.
Maybe you could also explain why it doesn't act as a type constraint? I feel that would be useful.

@kevincox

Copy link
Copy Markdown
Contributor

I would love for this to be a constraint.

* @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
Copy Markdown
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.

@maropumaropu mentioned this pull request Apr 23, 2017
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
This pr proposed to close stale PRs. Currently, we have 400+ open PRs and there are some stale PRs whose JIRA tickets have been already closed and whose JIRA tickets does not exist (also, they seem not to be minor issues).
// Open PRs whose JIRA tickets have been already closed
Closesapache#11785Closesapache#13027Closesapache#13614Closesapache#13761Closesapache#15197Closesapache#14006Closesapache#12576Closesapache#15447Closesapache#13259Closesapache#15616Closesapache#14473Closesapache#16638Closesapache#16146Closesapache#17269Closesapache#17313Closesapache#17418Closesapache#17485Closesapache#17551Closesapache#17463Closesapache#17625
// Open PRs whose JIRA tickets does not exist and they are not minor issues
Closesapache#10739Closesapache#15193Closesapache#15344Closesapache#14804Closesapache#16993Closesapache#17040Closesapache#15180Closesapache#17238
N/A
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closesapache#17734 from maropu/resolved_pr.
Change-Id: Id2e590aa7283fe5ac01424d30a40df06da6098b5
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This pr proposed to close stale PRs. Currently, we have 400+ open PRs and there are some stale PRs whose JIRA tickets have been already closed and whose JIRA tickets does not exist (also, they seem not to be minor issues).
// Open PRs whose JIRA tickets have been already closed
Closesapache#11785Closesapache#13027Closesapache#13614Closesapache#13761Closesapache#15197Closesapache#14006Closesapache#12576Closesapache#15447Closesapache#13259Closesapache#15616Closesapache#14473Closesapache#16638Closesapache#16146Closesapache#17269Closesapache#17313Closesapache#17418Closesapache#17485Closesapache#17551Closesapache#17463Closesapache#17625
// Open PRs whose JIRA tickets does not exist and they are not minor issues
Closesapache#10739Closesapache#15193Closesapache#15344Closesapache#14804Closesapache#16993Closesapache#17040Closesapache#15180Closesapache#17238
## How was this patch tested?
N/A
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closesapache#17734 from maropu/resolved_pr.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@francoisprunier@AmplabJenkins@kevincox@blrnw3@nchammas