fix issues

This commit is contained in:
Andrei Nekrashevich 2020-05-13 03:20:41 +03:00
parent 1d52c1b9d0
commit 767a790fce
3 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,7 @@ public:
if (!isUnsignedInteger(arguments[0].type))
throw Exception("First argument for function " + getName() + " must be unsigned integer", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
if (!arguments[0].column)
if (!arguments[0].column || !isColumnConst(*arguments[0].column))
throw Exception("First argument for function " + getName() + " must be constant", ErrorCodes::ILLEGAL_COLUMN);
const size_t n = arguments[0].column->getUInt(0);

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
SELECT DISTINCT c > 30000 FROM (SELECT arrayJoin(arrayMap(x -> reinterpretAsUInt8(substring(randomFixedString(100), x + 1, 1)), range(100))) AS byte, count() AS c FROM numbers(100000) GROUP BY byte ORDER BY byte);