Skip to content

Conversation

@berkaysynnada
Copy link
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

We use these utils in our fork and think they could be useful in here as well. They provide convenient ways to create default, minimum, and maximum ScalarValue instances for various data types.

What changes are included in this PR?

  • Add ScalarValue::new_default() - returns default values for data types (zero for numeric, empty for strings/collections)
  • Add ScalarValue::min() - returns minimum representable values for numeric/temporal types
  • Add ScalarValue::max() - returns maximum representable values for numeric/temporal types

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the common Related to common crate label Jul 24, 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.

This makes sense to me and I think it is a nice feature. Thank you @berkaysynnada

@xudong963 xudong963 merged commit 871d4b5 into apache:main Jul 26, 2025
27 checks passed
adriangb pushed a commit to pydantic/datafusion that referenced this pull request Jul 28, 2025
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.

3 participants