Skip to content

Implement monotonicity for ScalarUDF #8756

Closed
@guojidan

Description

@guojidan

Is your feature request related to a problem or challenge?

part of #8045 .

Now ScalarUDF is not supported monotonicity -- this means that certain sort related optimizations can not be applied to expressions that use ScalarUDF.

Describe the solution you'd like

No response

Describe alternatives you've considered

I think ScalarUDF's monotonicity should defined by User-self, so we can add monotonicity function for ScalarUDFImpl trait, like this:

pub trait ScalarUDFImpl {
    fn monotonicity() -> Result<Option<FuncMonotonicity>> {
        Ok(None)
    }
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions