ClickHouse/tests/queries/0_stateless/02975_intdiv_with_decimal.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
3.4 KiB
MySQL
Raw Normal View History

2024-01-25 21:44:46 +00:00
--intDiv--
SELECT intDiv(4,2);
SELECT intDiv(toDecimal32(4.4, 2), 2);
SELECT intDiv(4, toDecimal32(2.2, 2));
SELECT intDiv(toDecimal32(4.4, 2), 2);
SELECT intDiv(toDecimal32(4.4, 2), toDecimal32(2.2, 2));
SELECT intDiv(toDecimal64(4.4, 3), 2);
SELECT intDiv(toDecimal64(4.4, 3), toDecimal32(2.2, 2));
SELECT intDiv(toDecimal128(4.4, 4), 2);
SELECT intDiv(toDecimal128(4.4, 4), toDecimal32(2.2, 2));
SELECT intDiv(toDecimal256(4.4, 5), 2);
SELECT intDiv(toDecimal256(4.4, 5), toDecimal32(2.2, 2));
SELECT intDiv(4, toDecimal64(2.2, 2));
SELECT intDiv(toDecimal32(4.4, 2), toDecimal64(2.2, 2));
SELECT intDiv(4, toDecimal128(2.2, 3));
SELECT intDiv(toDecimal32(4.4, 2), toDecimal128(2.2, 2));
2024-01-25 21:44:46 +00:00
SELECT intDiv(4, toDecimal256(2.2, 4));
SELECT intDiv(toDecimal32(4.4, 2), toDecimal256(2.2, 2));
2024-01-25 21:44:46 +00:00
SELECT intDiv(toDecimal64(4.4, 2), toDecimal64(2.2, 2));
SELECT intDiv(toDecimal128(4.4, 2), toDecimal64(2.2, 2));
SELECT intDiv(toDecimal256(4.4, 2), toDecimal64(2.2, 2));
SELECT intDiv(toDecimal64(4.4, 2), toDecimal128(2.2, 2));
SELECT intDiv(toDecimal128(4.4, 2), toDecimal128(2.2, 2));
SELECT intDiv(toDecimal256(4.4, 2), toDecimal128(2.2, 2));
SELECT intDiv(toDecimal64(4.4, 2), toDecimal256(2.2, 2));
SELECT intDiv(toDecimal128(4.4, 2), toDecimal256(2.2, 2));
SELECT intDiv(toDecimal256(4.4, 2), toDecimal256(2.2, 2));
2024-01-29 15:33:09 +00:00
SELECT intDiv(4.2, toDecimal32(2.2, 2));
SELECT intDiv(4.2, toDecimal64(2.2, 2));
SELECT intDiv(4.2, toDecimal128(2.2, 2));
SELECT intDiv(4.2, toDecimal256(2.2, 2));
SELECT intDiv(toDecimal32(4.4, 2), 2.2);
SELECT intDiv(toDecimal64(4.4, 2), 2.2);
SELECT intDiv(toDecimal128(4.4, 2), 2.2);
SELECT intDiv(toDecimal256(4.4, 2), 2.2);
2024-01-25 21:44:46 +00:00
--intDivOrZero--
SELECT intDivOrZero(4,2);
SELECT intDivOrZero(toDecimal32(4.4, 2), 2);
SELECT intDivOrZero(4, toDecimal32(2.2, 2));
SELECT intDivOrZero(toDecimal32(4.4, 2), 2);
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal32(2.2, 2));
SELECT intDivOrZero(toDecimal64(4.4, 3), 2);
SELECT intDivOrZero(toDecimal64(4.4, 3), toDecimal32(2.2, 2));
SELECT intDivOrZero(toDecimal128(4.4, 4), 2);
SELECT intDivOrZero(toDecimal128(4.4, 4), toDecimal32(2.2, 2));
SELECT intDivOrZero(toDecimal256(4.4, 5), 2);
SELECT intDivOrZero(toDecimal256(4.4, 5), toDecimal32(2.2, 2));
SELECT intDivOrZero(4, toDecimal64(2.2, 2));
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal64(2.2, 2));
SELECT intDivOrZero(4, toDecimal128(2.2, 3));
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal128(2.2, 2));
2024-01-25 21:44:46 +00:00
SELECT intDivOrZero(4, toDecimal256(2.2, 4));
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal256(2.2, 2));
2024-01-25 21:44:46 +00:00
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal64(2.2, 2));
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal64(2.2, 2));
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal64(2.2, 2));
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal128(2.2, 2));
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal128(2.2, 2));
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal128(2.2, 2));
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal256(2.2, 2));
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal256(2.2, 2));
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal256(2.2, 2));
2024-01-29 15:33:09 +00:00
SELECT intDivOrZero(4.2, toDecimal32(2.2, 2));
SELECT intDivOrZero(4.2, toDecimal64(2.2, 2));
SELECT intDivOrZero(4.2, toDecimal128(2.2, 2));
SELECT intDivOrZero(4.2, toDecimal256(2.2, 2));
SELECT intDivOrZero(toDecimal32(4.4, 2), 2.2);
SELECT intDivOrZero(toDecimal64(4.4, 2), 2.2);
SELECT intDivOrZero(toDecimal128(4.4, 2), 2.2);
SELECT intDivOrZero(toDecimal256(4.4, 2), 2.2);