mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
parent
5410f73ba7
commit
1549baa4e9
@ -268,7 +268,7 @@ struct Settings
|
||||
M(SettingUInt64, enable_conditional_computation, 0, "Enable conditional computations") \
|
||||
\
|
||||
M(SettingDateTimeInputFormat, date_time_input_format, FormatSettings::DateTimeInputFormat::Basic, "Method to read DateTime from text input formats. Possible values: 'basic' and 'best_effort'.") \
|
||||
M(SettingBool, enable_optimize_predicate_expression, 0, "") \
|
||||
M(SettingBool, enable_optimize_predicate_expression, 0, "If it is set to true, optimize predicates to subqueries.") \
|
||||
\
|
||||
M(SettingUInt64, low_cardinality_max_dictionary_size, 8192, "Maximum size (in rows) of shared global dictionary for LowCardinality type.") \
|
||||
M(SettingBool, low_cardinality_use_single_dictionary_for_part, false, "LowCardinality type serialization setting. If is true, than will use additional keys when global dictionary overflows. Otherwise, will create several shared dictionaries.") \
|
||||
|
@ -10,8 +10,8 @@
|
||||
2000-01-01 1
|
||||
2000-01-01 1 test string 1 1
|
||||
2000-01-01 1 test string 1 1
|
||||
1 test string 1
|
||||
1 test string 1
|
||||
1 test string 1 1 test string 1
|
||||
1 test string 1 1 test string 1
|
||||
test string 1 1 1
|
||||
test string 1 1 1
|
||||
1
|
||||
|
@ -4,3 +4,5 @@
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
1
|
||||
|
28
dbms/tests/queries/0_stateless/00687_top_and_offset.sh
Executable file
28
dbms/tests/queries/0_stateless/00687_top_and_offset.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test.test;"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "CREATE TABLE test.test(val Int64) engine = Memory;"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (1);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (2);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (3);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (4);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (5);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (6);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (7);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (8);"
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test.test VALUES (9);"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT TOP 2 * FROM test.test ORDER BY val;"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT TOP (2) * FROM test.test ORDER BY val;"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test.test ORDER BY val LIMIT 2 OFFSET 2;"
|
||||
|
||||
echo `${CLICKHOUSE_CLIENT} --query "SELECT TOP 2 * FROM test.test ORDER BY val LIMIT 2;" 2>&1 | grep -c "Code: 406"`
|
||||
echo `${CLICKHOUSE_CLIENT} --query "SELECT * FROM test.test ORDER BY val LIMIT 2,3 OFFSET 2;" 2>&1 | grep -c "Code: 62"`
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE test.test;"
|
@ -1,21 +0,0 @@
|
||||
DROP TABLE IF EXISTS test.test;
|
||||
|
||||
CREATE TABLE test.test(val Int64) engine = Memory;
|
||||
|
||||
INSERT INTO test.test VALUES (1);
|
||||
INSERT INTO test.test VALUES (2);
|
||||
INSERT INTO test.test VALUES (3);
|
||||
INSERT INTO test.test VALUES (4);
|
||||
INSERT INTO test.test VALUES (5);
|
||||
INSERT INTO test.test VALUES (6);
|
||||
INSERT INTO test.test VALUES (7);
|
||||
INSERT INTO test.test VALUES (8);
|
||||
INSERT INTO test.test VALUES (9);
|
||||
|
||||
SELECT TOP 2 * FROM test.test ORDER BY val;
|
||||
SELECT TOP (2) * FROM test.test ORDER BY val;
|
||||
SELECT * FROM test.test ORDER BY val LIMIT 2 OFFSET 2;
|
||||
SELECT TOP 2 * FROM test.test ORDER BY val LIMIT 2; -- { clientError 406 }
|
||||
SELECT * FROM test.test ORDER BY val LIMIT 2,3 OFFSET 2; -- { clientError 62 }
|
||||
|
||||
DROP TABLE test.test;
|
Loading…
Reference in New Issue
Block a user