Added test for one of previous modifications [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-07-14 04:04:35 +03:00
parent 9bb902c3ef
commit d61ad166e9
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,68 @@
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 x ┃ s  ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ 1 │ 1 │
├────────────┼────────────┤
│ 10 │ 10 │
├────────────┼────────────┤
│ 100 │ 100 │
├────────────┼────────────┤
│ 1001 │ 1001 │
├────────────┼────────────┤
│ 10001 │ 10001 │
├────────────┼────────────┤
│ 100000 │ 100000 │
├────────────┼────────────┤
│ 1000000 │ 1000000 │
├────────────┼────────────┤
│ 10000000 │ 10000000 │
├────────────┼────────────┤
│ 100000000 │ 100000000 │
├────────────┼────────────┤
│ 1000000000 │ 1000000000 │
└────────────┴────────────┘
┌──────────x─┬─s──────────┐
│ 1 │ 1 │
│ 10 │ 10 │
│ 100 │ 100 │
│ 1001 │ 1001 │
│ 10001 │ 10001 │
│ 100000 │ 100000 │
│ 1000000 │ 1000000 │
│ 10000000 │ 10000000 │
│ 100000000 │ 100000000 │
│ 1000000000 │ 1000000000 │
└────────────┴────────────┘
x s
1 1
10 10
100 100
1001 1001
10001 10001
100000 100000
1000000 1000000
10000000 10000000
100000000 100000000
1000000000 1000000000
┌──────────x─┬─s──────────┐
│ 1 │ 1 │
│ 10 │ 10 │
│ 100 │ 100 │
│ 1001 │ 1001 │
│ 10001 │ 10001 │
│ 100000 │ 100000 │
│ 1000000 │ 1000000 │
│ 10000000 │ 10000000 │
│ 100000000 │ 100000000 │
│ 1000000000 │ 1000000000 │
└────────────┴────────────┘
┏━━━━━━━━━━━━━━━━━━┓
\'\\\\\\\'\\\'\' ┃
┡━━━━━━━━━━━━━━━━━━┩
│ \\\'\' │
└──────────────────┘
Row 1:
──────
\'\\\\\\\'\\\'\': \\\'\'
1: 1

View File

@ -0,0 +1,7 @@
SELECT toUInt64(ceil(exp10(number))) AS x, toString(x) AS s FROM system.numbers LIMIT 10 FORMAT Pretty;
SELECT toUInt64(ceil(exp10(number))) AS x, toString(x) AS s FROM system.numbers LIMIT 10 FORMAT PrettyCompact;
SELECT toUInt64(ceil(exp10(number))) AS x, toString(x) AS s FROM system.numbers LIMIT 10 FORMAT PrettySpace;
SET max_block_size = 5;
SELECT toUInt64(ceil(exp10(number))) AS x, toString(x) AS s FROM system.numbers LIMIT 10 FORMAT PrettyCompactMonoBlock;
SELECT '\\''\'' FORMAT Pretty;
SELECT '\\''\'', 1 FORMAT Vertical;