mirror of https://gitee.com/bigwinds/arangodb
re-enable test; its working now.
This commit is contained in:
parent
74248e64f0
commit
f8b681a5f8
|
@ -660,38 +660,38 @@ function optimizerRuleTestSuite() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
testRangeBandpassInvalid: function () {
|
||||
// TODO: this doesn't do anything. should it simply flush that range since its empty? or even raise? -> NoResultsNode????
|
||||
// var query = "FOR v IN " + colName + " FILTER v.a > 7 && v.a < 4 RETURN [v.a, v.b]";
|
||||
//
|
||||
// var XPresult;
|
||||
// var QResults=[];
|
||||
//
|
||||
// // the index we will compare to sorts by a & b, so we need to re-sort the result here to accomplish similarity.
|
||||
// QResults[0] = AQL_EXECUTE(query, { }, paramNone).json.sort(sortArray);
|
||||
//
|
||||
// // -> use-index-range alone.
|
||||
// QResults[1] = AQL_EXECUTE(query, { }, paramIndexRange).json;
|
||||
//
|
||||
//
|
||||
// XPresult = AQL_EXPLAIN(query, { }, paramIndexRange);
|
||||
// require("internal").print(XPresult);
|
||||
// assertEqual([ secondRuleName ], XPresult.plan.rules);
|
||||
// // the sortnode and its calculation node should be there.
|
||||
// hasCalculationNodes(XPresult, 2);
|
||||
//
|
||||
// // The IndexRangeNode created by this rule should be more clever, it knows the ranges.
|
||||
// var RAs = getRangeAttributes(XPresult);
|
||||
// require("internal").print(RAs);
|
||||
// var first = getRangeAttribute(RAs, "v", "a", 1);
|
||||
//
|
||||
// require("internal").print(first);
|
||||
// require("internal").print(first);
|
||||
// assertEqual(first.low.bound.vType, "int", "Type is int");
|
||||
// assertEqual(first.low.bound.value, 4, "proper value was set");
|
||||
// assertEqual(first.high.bound.vType, "int", "Type is int");
|
||||
// assertEqual(first.high.bound.value, 10, "proper value was set");
|
||||
//
|
||||
// assertTrue(isEqual(QResults[0], QResults[1]), "Results are Equal?");
|
||||
//
|
||||
var query = "FOR v IN " + colName + " FILTER v.a > 7 && v.a < 4 RETURN [v.a, v.b]";
|
||||
|
||||
var XPresult;
|
||||
var QResults=[];
|
||||
|
||||
// the index we will compare to sorts by a & b, so we need to re-sort the result here to accomplish similarity.
|
||||
QResults[0] = AQL_EXECUTE(query, { }, paramNone).json.sort(sortArray);
|
||||
|
||||
// -> use-index-range alone.
|
||||
QResults[1] = AQL_EXECUTE(query, { }, paramIndexRange).json;
|
||||
|
||||
|
||||
XPresult = AQL_EXPLAIN(query, { }, paramIndexRange);
|
||||
require("internal").print(XPresult);
|
||||
assertEqual([ secondRuleName ], XPresult.plan.rules);
|
||||
// the sortnode and its calculation node should be there.
|
||||
hasCalculationNodes(XPresult, 2);
|
||||
|
||||
// The IndexRangeNode created by this rule should be more clever, it knows the ranges.
|
||||
var RAs = getRangeAttributes(XPresult);
|
||||
require("internal").print(RAs);
|
||||
var first = getRangeAttribute(RAs, "v", "a", 1);
|
||||
|
||||
require("internal").print(first);
|
||||
require("internal").print(first);
|
||||
assertEqual(first.low.bound.vType, "int", "Type is int");
|
||||
assertEqual(first.low.bound.value, 4, "proper value was set");
|
||||
assertEqual(first.high.bound.vType, "int", "Type is int");
|
||||
assertEqual(first.high.bound.value, 10, "proper value was set");
|
||||
|
||||
assertTrue(isEqual(QResults[0], QResults[1]), "Results are Equal?");
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue