ClickHouse/tests/queries/0_stateless/00568_empty_function_with_fixed_string.sql

9 lines
372 B
MySQL
Raw Normal View History

2018-02-09 11:38:24 +00:00
SELECT toFixedString('', 4) AS str, empty(str) AS is_empty;
SELECT toFixedString('\0abc', 4) AS str, empty(str) AS is_empty;
DROP TABLE IF EXISTS defaulted;
CREATE TABLE defaulted (v6 FixedString(16)) ENGINE=Memory;
INSERT INTO defaulted SELECT toFixedString('::0', 16) FROM numbers(32768);
SELECT count(), notEmpty(v6) e FROM defaulted GROUP BY e;
DROP TABLE defaulted;