Skip to content

Docs: Improve the documentation on ScalarValue - #8378

Merged
Dandandan merged 3 commits into
apache:mainfrom
alamb:alamb/document-nulls
Dec 2, 2023
Merged

Docs: Improve the documentation on ScalarValue#8378
Dandandan merged 3 commits into
apache:mainfrom
alamb:alamb/document-nulls

Conversation

@alamb

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #7013

Rationale for this change

Creating null ScalarValues is confusing, and it came up internally in IOx, so I would like to improve the documentation to try and make this concept clearer

What changes are included in this PR?

  1. Update ScalarValue documentation and adds some examples

Are these changes tested?

Yes, doc tests

Are there any user-facing changes?

Better docs and examples

@alambalamb added documentation Improvements or additions to documentation devrel labels Nov 30, 2023
@alambalamb changed the title Minor: Improve the documentation on ScalarValueDocs: Improve the documentation on ScalarValueNov 30, 2023
@alamb
alamb marked this pull request as ready for review November 30, 2023 20:16
Comment threaddatafusion/common/src/scalar.rs
Comment threaddatafusion/common/src/scalar.rs Outdated
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
@github-actionsgithub-actionsBot removed the documentation Improvements or additions to documentation label Nov 30, 2023
Comment threaddatafusion/common/src/scalar.rs Outdated
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
@Dandandan
Dandandan merged commit 3b29837 into apache:mainDec 2, 2023
@Dandandan

Copy link
Copy Markdown
Contributor

Thanks for all these doc improvements @alamb

@alamb
alamb deleted the alamb/document-nulls branch December 3, 2023 12:29
///
/// # Null Handling
///
/// `ScalarValue` represents null values in the same way as Arrow. Nulls are

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

FYI @jayzhan211 -- perhaps this can help explain some of how we can avoid using NullArray / ScalarValue::Null in the various list array functions

appletreeisyellow pushed a commit to appletreeisyellow/datafusion that referenced this pull request Dec 14, 2023
* Minor: Improve the documentation on `ScalarValue`
* Update datafusion/common/src/scalar.rs
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
* Update datafusion/common/src/scalar.rs
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
---------
Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
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.

3 participants

@alamb@Dandandan@viirya