Skip to content

Add SQL function overload LOG(base, x) for logarithm of x to base #5206

Description

@stuartcarnie

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

As a user, I would like to determine the logarithm of a value, $x$ to base $b$.

Describe the solution you'd like

Add an overload to the log function, which takes two arguments. Using PostgreSQL for inspiration per the documentation:

log ( b numeric, x numeric ) → numeric
Logarithm of $x$ to base $b$
log(2.0, 64.0) → 6.0000000000000000

Describe alternatives you've considered

DataFusion strives for PostgreSQL compatibility, so it makes sense to use the PostgreSQL solution.

Additional context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions