-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36224][SQL] Use Void as the type name of NullType #33437
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-36224][SQL] Use Void as the type name of NullType #33437
Conversation
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141320 has finished for PR 33437 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
HyukjinKwon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me if tests pass
|
cc @cloud-fan, @dongjoon-hyun, @MaxGekk FYI |
|
Test build #141400 has finished for PR 33437 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141431 has finished for PR 33437 at commit
|
4f0a5c9 to
e3e563c
Compare
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141463 has finished for PR 33437 at commit
|
|
Test build #141471 has finished for PR 33437 at commit
|
|
cc @cloud-fan, the jenkins tests passed. |
MaxGekk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the type name of "NULL" is changed from "null" to "void". for example:
@linhongliu-db If this PR introduces behavior change, should we mention this in the SQL migration guide?
@MaxGekk We can add this to the migration guide. But I personally think it's not necessary because the change is very minor and I don't think changing the type name will break the user's existing workload. i.e. there is no migration needed. |
db290d9 to
7ac3c18
Compare
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141819 has finished for PR 33437 at commit
|
@cloud-fan looks like we can also remove |
Yea, let's remove it as well |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141873 has finished for PR 33437 at commit
|
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #141895 has finished for PR 33437 at commit
|
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #141937 has finished for PR 33437 at commit
|
|
The DDL type string round trip is really a good point, and it's kind of a bug that |
### What changes were proposed in this pull request? Change the `NullType.simpleString` to "void" to set "void" as the formal type name of `NullType` ### Why are the changes needed? This PR is intended to address the type name discussion in PR #28833. Here are the reasons: 1. The type name of NullType is displayed everywhere, e.g. schema string, error message, document. Hence it's not possible to hide it from users, we have to choose a proper name 2. The "void" is widely used as the type name of "NULL", e.g. Hive, pgSQL 3. Changing to "void" can enable the round trip of `toDDL`/`fromDDL` for NullType. (i.e. make `from_json(col, schema.toDDL)`) work ### Does this PR introduce _any_ user-facing change? Yes, the type name of "NULL" is changed from "null" to "void". for example: ``` scala> sql("select null as a, 1 as b").schema.catalogString res5: String = struct<a:void,b:int> ``` ### How was this patch tested? existing test cases Closes #33437 from linhongliu-db/SPARK-36224-void-type-name. Authored-by: Linhong Liu <linhong.liu@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 2f70077) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
Change the
NullType.simpleStringto "void" to set "void" as the formal type name ofNullTypeWhy are the changes needed?
This PR is intended to address the type name discussion in PR #28833. Here are the reasons:
toDDL/fromDDLfor NullType. (i.e. makefrom_json(col, schema.toDDL)) workDoes this PR introduce any user-facing change?
Yes, the type name of "NULL" is changed from "null" to "void". for example:
How was this patch tested?
existing test cases