Merge pull request #69751 from evillique/keepermap-parameters

Save CREATE QUERY with KeeperMap engine with evaluated parameters
This commit is contained in:
Nikolay Degterinsky 2024-09-19 08:38:10 +00:00 committed by GitHub
commit efc0cec707
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 2 deletions

View File

@ -1473,8 +1473,8 @@ StoragePtr create(const StorageFactory::Arguments & args)
"zk_root_path: path in the Keeper where the values will be stored (required)\n"
"keys_limit: number of keys allowed to be stored, 0 is no limit (default: 0)");
const auto zk_root_path_node = evaluateConstantExpressionAsLiteral(engine_args[0], args.getLocalContext());
auto zk_root_path = checkAndGetLiteralArgument<std::string>(zk_root_path_node, "zk_root_path");
engine_args[0] = evaluateConstantExpressionAsLiteral(engine_args[0], args.getLocalContext());
auto zk_root_path = checkAndGetLiteralArgument<std::string>(engine_args[0], "zk_root_path");
UInt64 keys_limit = 0;
if (engine_args.size() > 1)

View File

@ -0,0 +1 @@
CREATE TABLE default.`03236_keeper_map_engine_parameters`\n(\n `key` UInt64,\n `value` UInt64\n)\nENGINE = KeeperMap(\'/default/test2417\')\nPRIMARY KEY key

View File

@ -0,0 +1,8 @@
-- Tags: no-ordinary-database, no-fasttest
DROP TABLE IF EXISTS 03236_keeper_map_engine_parameters;
CREATE TABLE 03236_keeper_map_engine_parameters (key UInt64, value UInt64) Engine=KeeperMap('/' || currentDatabase() || '/test2417') PRIMARY KEY(key);
SHOW CREATE 03236_keeper_map_engine_parameters;
DROP TABLE 03236_keeper_map_engine_parameters;