diff --git a/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.reference b/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.reference new file mode 100644 index 00000000000..0cfbf08886f --- /dev/null +++ b/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.reference @@ -0,0 +1 @@ +2 diff --git a/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.sql b/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.sql new file mode 100644 index 00000000000..5dfb2b9d5ed --- /dev/null +++ b/dbms/tests/queries/0_stateless/01032_cityHash64_for_UUID.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS t_uuid; +CREATE TABLE t_uuid (x UUID) ENGINE=TinyLog; +INSERT INTO t_uuid SELECT generateUUIDv4(); +INSERT INTO t_uuid SELECT generateUUIDv4(); +SELECT count() FROM t_uuid WHERE cityHash64(x) = cityHash64(toString(x)); diff --git a/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.reference b/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.reference new file mode 100644 index 00000000000..4eb10942ed6 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.reference @@ -0,0 +1,6 @@ +1 +1 +1 +2 +2 +2 diff --git a/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.sql b/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.sql new file mode 100644 index 00000000000..eb1a80362eb --- /dev/null +++ b/dbms/tests/queries/0_stateless/01032_cityHash64_for_decimal.sql @@ -0,0 +1,7 @@ +SELECT cityHash64(toDecimal32(32, 2)) = cityHash64(toString(toDecimal32(32, 2))); +SELECT cityHash64(toDecimal64(64, 5)) = cityHash64(toString(toDecimal64(64, 5))); +SELECT cityHash64(toDecimal128(128, 24)) = cityHash64(toString(toDecimal128(128, 24))); +SELECT count() FROM numbers(200, 2) WHERE cityHash64(toDecimal32(number, 4)) = cityHash64(toString(toDecimal32(number, 4))); +SELECT count() FROM numbers(2301, 2) WHERE cityHash64(toDecimal64(number, 6)) = cityHash64(toString(toDecimal64(number, 6))); +SELECT count() FROM numbers(2143, 2) WHERE cityHash64(toDecimal128(number, 10)) = cityHash64(toString(toDecimal128(number, 10))); +