Skip to content

PostgreSQL compatibility: sqrt(-1.0::float8) should error, not return NaN #22260

Description

@Dandandan

Split out from #22247.

Mismatch

sqrt(-1.0::float8) should error, not return NaN.

SELECT sqrt((-1.0)::float8);

PostgreSQL:

ERROR: cannot take square root of a negative number

DataFusion:

NaN

Expected behavior

For PostgreSQL-compatible SQL semantics, DataFusion should either match PostgreSQL's result or raise the same class of domain/semantic error.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions