ClickHouse/tests/queries/0_stateless/01451_normalize_query.sql

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

46 lines
2.0 KiB
MySQL
Raw Normal View History

2020-08-16 19:23:03 +00:00
SELECT normalizeQuery('SELECT 1');
SELECT normalizeQuery('SELECT 1');
SELECT normalizeQuery('SELECT 1, 1, 1');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hwllo */');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\'');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\' WHERE 1');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\' WHERE 1 = 1');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\' WHERE 1 = 1 AND (x, y)');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\' WHERE 1 = 1 AND (1, y)');
SELECT normalizeQuery('[1, 2, 3]');
SELECT normalizeQuery('[1, 2, 3, x]');
SELECT normalizeQuery('SELECT 1, 1, 1, /* Hello */ \'abc\' WHERE 1 = 1 AND (1, y) LIMIT 1, 1');
SELECT normalizeQuery('SELECT 1 AS `xyz`');
SELECT normalizeQuery('SELECT 1 AS `xyz1`');
SELECT normalizeQuery('SELECT 1 AS `xyz11`');
SELECT normalizeQuery('SELECT 1 AS xyz111');
SELECT normalizeQuery('SELECT 1 AS xyz1');
SELECT normalizeQuery('SELECT 1 AS xyz11');
SELECT normalizeQuery('SELECT 1 xyz11');
SELECT normalizeQuery('SELECT 1, xyz11');
SELECT normalizeQuery('SELECT 1, ''xyz11''');
2021-07-25 19:01:25 +00:00
SELECT normalizeQuery('SELECT $doc$VALUE$doc$ xyz11');
SELECT normalizeQuery('SELECT $doc$VALUE$doc$, xyz11');
SELECT normalizeQuery('SELECT $doc$VALUE$doc$, ''xyz11''');
SELECT normalizeQuery('1 - 2');
SELECT normalizeQuery('1, -2, 3');
SELECT normalizeQuery('-1, -2, 3');
SELECT normalizeQuery('1 - 2, 3, 4');
SELECT normalizeQuery('f(-2, 3)');
SELECT normalizeQuery('[-1, 2, 3]');
SELECT normalizeQuery('1 + 2');
SELECT normalizeQuery('1, +2, 3');
SELECT normalizeQuery('-1, +2, 3');
SELECT normalizeQuery('1 + 2, 3, 4');
SELECT normalizeQuery('f(+2, 3)');
SELECT normalizeQuery('[+1, 2, 3]');
2024-01-12 15:44:52 +00:00
SELECT normalizeQuery('1, 2, 3 + 4');
SELECT normalizeQuery('1, 2 - 3, 4');
SELECT normalizeQuery('f(+2, 3), 1');
SELECT normalizeQuery('[+1, 2, 3] - 1');
SELECT normalizeQuery('-1, 1 - [+1, 2, 3] - 1');
SELECT normalizeQuery('(+1, 2, 3) - 1');
SELECT normalizeQuery('-1, 1 - (+1, 2, 3) - 1');
SELECT normalizeQuery('(+1, 2, -3)');