mirror of https://gitee.com/bigwinds/arangodb
fixed test failures
This commit is contained in:
parent
fe9b2d5bb5
commit
208914e3d7
|
@ -196,7 +196,8 @@ void AqlFunctionFeature::addStringFunctions() {
|
|||
add({"SHA512", ".", true, false, true, &Functions::Sha512});
|
||||
add({"HASH", ".", true, false, true, &Functions::Hash});
|
||||
add({"RANDOM_TOKEN", ".", false, true, true, &Functions::RandomToken});
|
||||
add({"FULLTEXT", ".h,.,.|." , false, true, false, &Functions::Fulltext});
|
||||
// FULLTEXT is replaced by the AQL optimizer with an index lookup
|
||||
add({"FULLTEXT", ".h,.,.|." , false, true, false, &Functions::NotImplemented});
|
||||
}
|
||||
|
||||
void AqlFunctionFeature::addNumericFunctions() {
|
||||
|
@ -293,14 +294,15 @@ void AqlFunctionFeature::addDocumentFunctions() {
|
|||
void AqlFunctionFeature::addGeoFunctions() {
|
||||
// geo functions
|
||||
add({"DISTANCE", ".,.,.,.", true, false, true, &Functions::Distance});
|
||||
add({"WITHIN_RECTANGLE", "h.,.,.,.,.", false, true, false, &Functions::WithinRectangle });
|
||||
add({"IS_IN_POLYGON", ".,.|.", true, false, true, &Functions::IsInPolygon});
|
||||
add({"GEO_DISTANCE", ".,.", true, false, true, &Functions::GeoDistance});
|
||||
add({"GEO_CONTAINS", ".,.", true, false, true, &Functions::GeoContains});
|
||||
add({"GEO_INTERSECTS", ".,.", true, false, true, &Functions::GeoIntersects});
|
||||
add({"GEO_EQUALS", ".,.", true, false, true, &Functions::GeoEquals});
|
||||
add({"NEAR", ".h,.,.|.,.", false, true, false, &Functions::Near});
|
||||
add({"WITHIN", ".h,.,.,.|.", false, true, false, &Functions::Within});
|
||||
// NEAR and WITHIN are replaced by the AQL optimizer with collection-based subqueries
|
||||
add({"NEAR", ".h,.,.|.,.", false, true, false, &Functions::NotImplemented});
|
||||
add({"WITHIN", ".h,.,.,.|.", false, true, false, &Functions::NotImplemented});
|
||||
add({"WITHIN_RECTANGLE", "h.,.,.,.,.", false, true, false, &Functions::NotImplemented });
|
||||
}
|
||||
|
||||
void AqlFunctionFeature::addGeometryConstructors() {
|
||||
|
|
|
@ -41,9 +41,7 @@ Function::Function(std::string const& name,
|
|||
initializeArguments();
|
||||
|
||||
// almost all AQL functions have a cxx implementation
|
||||
// only function V8() does not
|
||||
TRI_ASSERT(implementation != nullptr || name == "V8");
|
||||
|
||||
// only function V8() plus the ArangoSearch functions do not
|
||||
LOG_TOPIC(TRACE, Logger::FIXME) << "registered AQL function '" << name <<
|
||||
"'. cacheable: " << isCacheable() <<
|
||||
", deterministic: " << isDeterministic <<
|
||||
|
|
|
@ -7008,26 +7008,8 @@ AqlValue Functions::DateFormat(arangodb::aql::Query* query,
|
|||
return AqlValue(::executeDateFormatRegex(formatString, tp));
|
||||
}
|
||||
|
||||
AqlValue Functions::Near(arangodb::aql::Query* query, transaction::Methods*,
|
||||
VPackFunctionParameters const& params){
|
||||
::registerError(query, "NEAR", TRI_ERROR_NOT_IMPLEMENTED);
|
||||
return AqlValue(AqlValueHintNull());
|
||||
}
|
||||
|
||||
AqlValue Functions::Within(arangodb::aql::Query* query, transaction::Methods*,
|
||||
VPackFunctionParameters const& params){
|
||||
::registerError(query, "WITHIN", TRI_ERROR_NOT_IMPLEMENTED);
|
||||
return AqlValue(AqlValueHintNull());
|
||||
}
|
||||
|
||||
AqlValue Functions::Fulltext(arangodb::aql::Query* query, transaction::Methods*,
|
||||
VPackFunctionParameters const& params){
|
||||
::registerError(query, "FULLTEXT", TRI_ERROR_NOT_IMPLEMENTED);
|
||||
return AqlValue(AqlValueHintNull());
|
||||
}
|
||||
|
||||
AqlValue Functions::WithinRectangle(arangodb::aql::Query* query, transaction::Methods*,
|
||||
VPackFunctionParameters const& params){
|
||||
::registerError(query, "WITHIN_RECTANGLE", TRI_ERROR_NOT_IMPLEMENTED);
|
||||
AqlValue Functions::NotImplemented(arangodb::aql::Query* query, transaction::Methods*,
|
||||
VPackFunctionParameters const& params){
|
||||
::registerError(query, "UNKNOWN", TRI_ERROR_NOT_IMPLEMENTED);
|
||||
return AqlValue(AqlValueHintNull());
|
||||
}
|
||||
|
|
|
@ -458,18 +458,13 @@ struct Functions {
|
|||
static AqlValue Fail(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
|
||||
static AqlValue CurrentUser(arangodb::aql::Query*,
|
||||
static AqlValue CurrentUser(arangodb::aql::Query*,
|
||||
transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
|
||||
static AqlValue Near(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
static AqlValue Within(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
static AqlValue Fulltext(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
static AqlValue WithinRectangle(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
/// @brief dummy function that will only throw an error when called
|
||||
static AqlValue NotImplemented(arangodb::aql::Query*, transaction::Methods*,
|
||||
VPackFunctionParameters const&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue