apache / apache/datafusion-comet
Handle remainder by zero error in `spark_modulo` function for Spark 4.1 and later.
- Lingua principale
- Scala
- Stelle
- 1.3k
- Fork
- 375
- Merge medio
- 2g 10h
- PR unite (30g)
- 231
Descrizione
### What is the problem the feature request solves?
PR https://github.com/apache/datafusion-comet/pull/1971 introduced `spark_modulo` function, and found that Spark 4.0 and earlier version threw `Divide by Zero` instead of `Remainder by Zero` exception, which was incorrect. And so, filed https://issues.apache.org/jira/browse/SPARK-52659 for Spark to fix this.
That error message has now been fixed in the PR https://github.com/apache/spark/pull/51378 for Spark 4.1 and it will now throw `Reminder by Zero` instead of misleading `Divide by Zero`. This would require handling new error [here](https://github.com/apache/datafusion-comet/blob/fd0ab6441b078a8875b614ca2d615a102c592606/native/spark-expr/src/math_funcs/modulo_expr.rs#L58) for spark version 4.1 and later.
### Describe the potential solution
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziate in native/spark-expr/src/math_funcs/modulo_expr.rs, nel codice collegato di gestione degli errori per spark_modulo. Confrontate la gestione esistente di Divide by Zero con il comportamento di Remainder by Zero di Spark 4.1 e versioni successive, e verificate che la funzione segnali l’errore corretto per queste versioni di Spark senza modificare il comportamento delle versioni precedenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- data-engineering
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 72/100