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

Make it easier to create a ScalarValure representing typed null (#14548) #14558

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cj-zhukov
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the common Related to common crate label Feb 8, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @cj-zhukov !

/// assert_eq!(scalar.is_null(), true);
/// assert_eq!(scalar.data_type(), DataType::Int32);
/// ```
pub fn try_new_null(data_type: &DataType) -> Result<Self> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you @cj-zhukov 🙏

I think this duplicates much of the code in the TryFrom impl -- can you please change TryFrom to call this new function to avoid the duplication?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it easier to create a ScalarValure representing typed null
2 participants