fix build

This commit is contained in:
Yarik Briukhovetskyi 2024-08-05 16:59:45 +02:00 committed by GitHub
parent 5cac24efa0
commit eb2c2730ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,18 +81,18 @@ public:
//File name to drop is escaped_db_name.escaped_table_name.uuid.sql //File name to drop is escaped_db_name.escaped_table_name.uuid.sql
//File name to create is table_name.sql //File name to create is table_name.sql
auto max_to_create = static_cast<size_t>(max_create_length) - suffix.length(); auto max_to_create = static_cast<size_t>(max_create_length) - suffix.length();
IColumn * col = arguments[0].column.get(); IColumn * col;
if (!isColumnConst(*col)) if (!isColumnConst(*arguments[0].column.get()))
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "The argument of function {} must be constant.", getName()); throw Exception(ErrorCodes::ILLEGAL_COLUMN, "The argument of function {} must be constant.", getName());
String database_name; String database_name;
WhichDataType which(arguments[0].type); WhichDataType which(arguments[0].type);
if (which.isString()) if (which.isString())
col = checkAndGetColumn<ColumnString>(col); col = checkAndGetColumn<ColumnString>(arguments[0].column.get());
else else
col = checkAndGetColumn<ColumnFixedString>(col); col = checkAndGetColumn<ColumnFixedString>(arguments[0].column.get());
database_name = col->getDataAt(1).toString(); database_name = col->getDataAt(1).toString();