[CH]Mod/Pmod throws `divide by zero` exceptions when right argument is zero
Open
bug
triage
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 657
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 80
Description
### Backend
CH (ClickHouse)
### Bug description
Mod/Pmod functions call throw `divide by zero` exceptions when right argument is zero, while the valina returns NULL
### Spark version
None
### Spark configurations
_No response_
### System information
_No response_
### Relevant logs
```bash
```
Contributor guide
Research direction
No file, test, or entry point is named. Start by reproducing Mod/Pmod in the ClickHouse backend with a zero right argument, then trace the handling of that case; done means both functions return NULL instead of throwing a divide-by-zero exception and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100