Skip to content

Implement lazy evaluation for nvl #17982

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

DataFusion's CASE handling is quite optimized and handles many cases with constants, lazy evaluation, and more

Recently, @chenkovsky fixed lazy evaluation for coalesce by rewriting it to use CASE in PR:

This both made the code faster and more correct

Describe the solution you'd like

We can do the same thing for the nvl function, as suggested by @pepijnve in #17813 (comment)

https://github.com/apache/datafusion/blob/main/datafusion/functions/src/core/nvl.rs

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions