Skip to content
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

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

Closed

Conversation

francoisprunier
Copy link

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

Can one of the admins verify this patch?

@kevincox
Copy link
Contributor

👍

@blrnw3
Copy link

blrnw3 commented Apr 14, 2016

👍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
Contributor

I would love for this to be a constraint.

@@ -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.

@maropu maropu mentioned this pull request Apr 23, 2017
maropu added a commit to maropu/spark that referenced this pull request Apr 23, 2017
@asfgit asfgit closed this in e9f9715 Apr 24, 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
Closes apache#11785
Closes apache#13027
Closes apache#13614
Closes apache#13761
Closes apache#15197
Closes apache#14006
Closes apache#12576
Closes apache#15447
Closes apache#13259
Closes apache#15616
Closes apache#14473
Closes apache#16638
Closes apache#16146
Closes apache#17269
Closes apache#17313
Closes apache#17418
Closes apache#17485
Closes apache#17551
Closes apache#17463
Closes apache#17625

// Open PRs whose JIRA tickets does not exist and they are not minor issues
Closes apache#10739
Closes apache#15193
Closes apache#15344
Closes apache#14804
Closes apache#16993
Closes apache#17040
Closes apache#15180
Closes apache#17238

N/A

Author: Takeshi Yamamuro <yamamuro@apache.org>

Closes apache#17734 from maropu/resolved_pr.

Change-Id: Id2e590aa7283fe5ac01424d30a40df06da6098b5
Sign up for free to 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