Skip to content

[datafusion-spark] Implement factorial function #16124

Open
@tlm365

Description

@tlm365

Is your feature request related to a problem or challenge?

Describe the solution you'd like

Implement spark-compatible factorial function.

Describe alternatives you've considered

No response

Additional context

  • Spark factorial behaviour:

factorial(expr) - Returns the factorial of expr. expr is [0..20]. Otherwise, null.

  • DataFusion factorial behaviour - unlimited expr theoretical (in fact, also support [0..20] due to the MAX limit of i64) and raise error when overflow.

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