Get the cache validation mode in order of file open info, client context (for client-local settings), or database config.
413437 {
413438
413439 if (info.extended_info != nullptr) {
413440 const auto &open_options = info.extended_info->options;
413441 const auto validate_entry = open_options.find("validate_external_file_cache");
413442 if (validate_entry != open_options.end()) {
413443 if (validate_entry->second.IsNull()) {
413444 throw InvalidInputException("Cannot use NULL as argument for validate_external_file_cache");
413445 }
413446 const bool validate_cache = BooleanValue::Get(validate_entry->second);
413447 return validate_cache ? CacheValidationMode::VALIDATE_ALL : CacheValidationMode::NO_VALIDATION;
413448 }
413449 }
413450
413451
413452 if (client_context) {
413453 return Settings::Get<ValidateExternalFileCacheSetting>(*client_context);
413454 }
413455
413456
413457 return Settings::Get<ValidateExternalFileCacheSetting>(db);
413458}