MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getFromConfigImpl

Method getFromConfigImpl

programs/keeper-bench/Generator.cpp:432–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430{}
431
432void CreateRequestGenerator::getFromConfigImpl(const std::string & key, const Poco::Util::AbstractConfiguration & config)
433{
434 if (config.has(key + ".watch_probability"))
435 throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "watch_probability is not supported for create requests (key '{}')", key);
436
437 parent_path = PathGetter::fromConfig(key, config);
438
439 name = StringGetter(NumberGetter::fromConfig(key + ".name_length", config, 10));
440
441 if (config.has(key + ".data"))
442 data = StringGetter::fromConfig(key + ".data", config);
443
444 if (config.has(key + ".remove_factor"))
445 {
446 remove_factor = config.getDouble(key + ".remove_factor");
447 if (*remove_factor < 0.0 || *remove_factor > 1.0)
448 throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "remove_factor must be in [0.0, 1.0], got {}", *remove_factor);
449 }
450}
451
452std::string CreateRequestGenerator::descriptionImpl()
453{

Callers

nothing calls this directly

Calls 4

StringGetterClass · 0.85
ExceptionClass · 0.50
hasMethod · 0.45
getDoubleMethod · 0.45

Tested by

no test coverage detected