ClickHouse/tests/queries/0_stateless/02475_positive_modulo.sql
李扬 ef45889ecb
Add function pmod which return non-negative result based on modulo (#42755)
* add function positive_modulo

* add ducument

* fix type deduction of positive_modulo

* add function positive_modulo

* add ducument

* fix type deduction of positive_modulo

* add notice

* fix typo

* fix typo

* fix bug

* fix ub error

* fix ub error
2022-11-15 00:15:58 +01:00

4 lines
139 B
SQL

SELECT positive_modulo(1000, 32);
SELECT positive_modulo(1000, -32);
SELECT positive_modulo(-1000, -32);
SELECT positive_modulo(-1000, 32);