Skip to content

Conversation

@codetyri0n
Copy link
Contributor

@codetyri0n codetyri0n commented Nov 25, 2025

Which issue does this PR close?

Rationale for this change

  • deprecating is_nullable in favour of return_field as it is already encoded within return_field

Are these changes tested?

  • yes

Are there any user-facing changes?

  • Deprecated method

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates labels Nov 25, 2025
Jefffrey
Jefffrey previously approved these changes Nov 26, 2025
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

Surprisingly fewer changes than I expected

@codetyri0n codetyri0n force-pushed the deprecate_is_nullable branch from 7f99f29 to 810cae5 Compare November 26, 2025 09:15
Copy link
Member

@martin-g martin-g left a comment

Choose a reason for hiding this comment

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

self.inner.window_function_display_name(params)
}

pub fn is_nullable(&self) -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

Should this method be deprecated too ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep thanks!

@codetyri0n
Copy link
Contributor Author

thanks for catching the mod.rs miss @martin-g , i had left the count.rs file untouched as i dont see the signature or the implementation getting altered much in the near future

@codetyri0n codetyri0n force-pushed the deprecate_is_nullable branch from 810cae5 to 2aeedc8 Compare November 26, 2025 17:07
@github-actions github-actions bot added the ffi Changes to the ffi crate label Nov 26, 2025
@codetyri0n
Copy link
Contributor Author

can we merge this?

@Jefffrey
Copy link
Contributor

Sorry I haven't gotten around to re-reviewing this after the latest changes

@Jefffrey Jefffrey dismissed their stale review November 29, 2025 11:46

New changes

Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

I think the changes look good in achieving what we want for the issue.

Some notes:

  • We should look at UDAFs that implement is_nullable and ensure they implement return_field in line with the deprecation; I think this only occurs for Count
    • Unfortunately it seems Rust can't flag this for us (implementations of deprecated methods)
  • I think this PR doesn't introduce behaviour changes so long as any downstream UDAFs that implement is_nullable either don't implement return_field (in which case the default behaviour still uses is_nullable), or if they do implement return_field hopefully it is consistent with is_nullable otherwise behaviour may change
    • That latter case seems like a bug in the downstream anyway, though not sure how to communicate this 🤔

One more thing is I wonder how we should handle this for FFI; for example we have is_nullable as part of the FFI API I believe:

/// FFI equivalent to the `is_nullable` of a [`AggregateUDF`]
pub is_nullable: bool,

Maybe @timsaucer can weigh in regarding FFI?

Apart from that, it would be good if could get some other opinions on if we want to proceed with this deprecation; I know for the UDF is_nullable deprecation there was some concern, see discussions on #14094 and #17074. cc @alamb if you have time

  • Maybe we should include a note in the upgrade guide to make this more visible since Rust can't flag the implementation of a deprecated trait method 🤔

@timsaucer
Copy link
Member

Two things:

  • The FFI portion looks correct. When we remove the API we can just remove these pieces of code.
  • I think we need a note in the upgrade guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ffi Changes to the ffi crate logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate AggregateUDFImpl::is_nullable in favour of return_field

4 participants