apache / apache/datafusion

PostgreSQL compatibility: `log(0.0::float8)` should error, not return `-inf`

Aperta
#22,261 7 commenti 1 reazione 1 assegnatario Rivendicata da @shinzoxD Vedi su GitHub
bug
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

Split out from #22247.

### Mismatch

`log(0.0::float8)` should error, not return `-inf`.

```sql
SELECT log(0.0::float8);
```

PostgreSQL:

```text
ERROR: cannot take logarithm of zero
```

DataFusion:

```text
-inf
```

### Expected behavior

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.