Add sorting to tests with union.

This commit is contained in:
Nikolai Kochetov 2019-07-05 17:52:29 +03:00
parent 45b7d479aa
commit a4b3338182
5 changed files with 13 additions and 13 deletions

View File

@ -23,7 +23,7 @@ CREATE VIEW TestView AS
FROM Test_00584
GROUP BY str;
SELECT * FROM TestView;
SELECT * FROM TestView ORDER BY key;
DROP TABLE TestView;
DROP TABLE Test_00584;

View File

@ -7,12 +7,12 @@
1 Nullable(UInt8)
\N Nullable(UInt8)
1
\N
1
\N
1 Nullable(Float64) 2
\N Nullable(Float64) 1
1
2
3
2
1
nan
\N

View File

@ -1,12 +1,12 @@
SET max_threads = 1;
SELECT 1 UNION ALL SELECT -1;
SELECT x, toTypeName(x) FROM (SELECT 1 AS x UNION ALL SELECT -1);
SELECT * FROM (SELECT 1 as x UNION ALL SELECT -1) ORDER BY x DESC;
SELECT * FROM (SELECT x, toTypeName(x) FROM (SELECT 1 AS x UNION ALL SELECT -1)) ORDER BY x DESC;
SELECT 1 UNION ALL SELECT NULL;
SELECT x, toTypeName(x) FROM (SELECT 1 AS x UNION ALL SELECT NULL);
SELECT x FROM (SELECT 1 as x UNION ALL SELECT NULL) ORDER BY x DESC;
SELECT * FROM (SELECT x, toTypeName(x) FROM (SELECT 1 AS x UNION ALL SELECT NULL)) ORDER BY x DESC;
SELECT 1 AS x UNION ALL SELECT NULL UNION ALL SELECT 1.0;
SELECT x, toTypeName(x), count() FROM (SELECT 1 AS x UNION ALL SELECT NULL UNION ALL SELECT 1.0) GROUP BY x;
SELECT x FROM (SELECT 1 AS x UNION ALL SELECT NULL UNION ALL SELECT 1.0) ORDER BY x DESC;
SELECT * FROM (SELECT x, toTypeName(x), count() FROM (SELECT 1 AS x UNION ALL SELECT NULL UNION ALL SELECT 1.0) GROUP BY x) ORDER BY x DESC;
SELECT arrayJoin(x) AS res FROM (SELECT [1, 2, 3] AS x UNION ALL SELECT [nan, NULL]) ORDER BY res;
SELECT res FROM (SELECT arrayJoin(x) AS res FROM (SELECT [1, 2, 3] AS x UNION ALL SELECT [nan, NULL]) ORDER BY res) ORDER BY res DESC;

View File

@ -17,7 +17,7 @@ CMD dpkg -i package_folder/clickhouse-common-static_*.deb; \
dpkg -i package_folder/clickhouse-client_*.deb; \
dpkg -i package_folder/clickhouse-test_*.deb; \
ln -s /usr/lib/llvm-8/bin/llvm-symbolizer /usr/bin/llvm-symbolizer; \
echo "TSAN_OPTIONS='halt_on_error=1 history_size=7 suppressions=/usr/share/clickhouse-test/config/tsan-suppressions.txt'" >> /etc/environment; \
echo "TSAN_OPTIONS='verbosity=1000 halt_on_error=1 history_size=7 suppressions=/usr/share/clickhouse-test/config/tsan-suppressions.txt'" >> /etc/environment; \
echo "TSAN_SYMBOLIZER_PATH=/usr/lib/llvm-8/bin/llvm-symbolizer" >> /etc/environment; \
echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment; \
echo "ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \

View File

@ -45,7 +45,7 @@ CMD dpkg -i package_folder/clickhouse-common-static_*.deb; \
ln -s /usr/share/clickhouse-test/config/strings_dictionary.xml /etc/clickhouse-server/; \
ln -s /usr/share/clickhouse-test/config/decimals_dictionary.xml /etc/clickhouse-server/; \
ln -s /usr/lib/llvm-8/bin/llvm-symbolizer /usr/bin/llvm-symbolizer; \
echo "TSAN_OPTIONS='halt_on_error=1 history_size=7 suppressions=/usr/share/clickhouse-test/config/tsan-suppressions.txt'" >> /etc/environment; \
echo "TSAN_OPTIONS='verbosity=1000 halt_on_error=1 history_size=7 suppressions=/usr/share/clickhouse-test/config/tsan-suppressions.txt'" >> /etc/environment; \
echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment; \
echo "ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \
echo "UBSAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \