mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
fix after master merge
This commit is contained in:
parent
8173c4fcff
commit
b59edcce40
@ -918,6 +918,7 @@ namespace ErrorCodes
|
||||
M(Bool, restore_replace_external_engines_to_null, false, "Replace all the external table engines to Null on restore. Useful for testing purposes", 0) \
|
||||
M(Bool, restore_replace_external_table_functions_to_null, false, "Replace all table functions to Null on restore. Useful for testing purposes", 0) \
|
||||
M(Bool, create_if_not_exists, false, "Enable IF NOT EXISTS for CREATE statements by default", 0) \
|
||||
M(Bool, mongodb_throw_on_unsupported_query, true, "If enabled, MongoDB tables will return an error when a MongoDB query cannot be built. Otherwise, ClickHouse reads the full table and processes it locally. This option does not apply to the legacy implementation or when 'allow_experimental_analyzer=0'.", 0) \
|
||||
\
|
||||
\
|
||||
/* ###################################### */ \
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "DictionarySourceFactory.h"
|
||||
#if USE_MONGODB
|
||||
#include <Common/RemoteHostFilter.h>
|
||||
#include "MongoDBPocoLegacyDictionarySource.h"
|
||||
#include "DictionaryStructure.h"
|
||||
#include "registerDictionaries.h"
|
||||
|
@ -42,6 +42,12 @@ namespace ErrorCodes
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
namespace Setting
|
||||
{
|
||||
extern const SettingsBool allow_experimental_analyzer;
|
||||
extern const SettingsBool mongodb_throw_on_unsupported_query;
|
||||
}
|
||||
|
||||
using BSONCXXHelper::fieldAsBSONValue;
|
||||
using BSONCXXHelper::fieldAsOID;
|
||||
|
||||
@ -279,9 +285,9 @@ bsoncxx::document::value StorageMongoDB::buildMongoDBQuery(const ContextPtr & co
|
||||
LOG_DEBUG(log, "MongoDB projection has built: '{}'", bsoncxx::to_json(projection));
|
||||
options.projection(projection.extract());
|
||||
|
||||
bool throw_on_error = context->getSettingsRef().mongodb_throw_on_unsupported_query;
|
||||
bool throw_on_error = context->getSettingsRef()[Setting::mongodb_throw_on_unsupported_query];
|
||||
|
||||
if (!context->getSettingsRef().allow_experimental_analyzer)
|
||||
if (!context->getSettingsRef()[Setting::allow_experimental_analyzer])
|
||||
{
|
||||
if (throw_on_error)
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "MongoDB storage does not support 'allow_experimental_analyzer = 0' setting");
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include "config.h"
|
||||
|
||||
#if USE_MONGODB
|
||||
#include <Common/RemoteHostFilter.h>
|
||||
|
||||
#include <Analyzer/JoinNode.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <Storages/IStorage.h>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <Interpreters/Context.h>
|
||||
#include <Common/parseAddress.h>
|
||||
#include <Common/NamedCollections/NamedCollections.h>
|
||||
#include <Common/RemoteHostFilter.h>
|
||||
#include <IO/Operators.h>
|
||||
#include <QueryPipeline/Pipe.h>
|
||||
#include <Processors/Sources/MongoDBPocoLegacySource.h>
|
||||
|
Loading…
Reference in New Issue
Block a user