diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/common/selectpruner_test.cpp | 2 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/common/selectpruner_test.cpp b/searchcore/src/tests/proton/common/selectpruner_test.cpp index cea72a556cc..4ec5bb928f6 100644 --- a/searchcore/src/tests/proton/common/selectpruner_test.cpp +++ b/searchcore/src/tests/proton/common/selectpruner_test.cpp @@ -618,8 +618,6 @@ TEST_F("Test that multiplication has higher priority than addition", TEST_F("Test that toplevel functions are visited", TestFixture) { - f.testPrune("searchcolumn.15 == 4", - "searchcolumn.15 == 4"); f.testPrune("id.scheme == \"doc\"", "id.scheme == \"doc\""); f.testPrune("test.aa < now() - 7200", diff --git a/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp b/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp index 0915c11acfa..da45953e7b9 100644 --- a/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp @@ -21,7 +21,6 @@ using document::select::Or; using document::select::ArithmeticValueNode; using document::select::FunctionValueNode; using document::select::IdValueNode; -using document::select::SearchColumnValueNode; using document::select::FieldValueNode; using document::select::FloatValueNode; using document::select::VariableValueNode; @@ -235,7 +234,7 @@ SelectPruner::visitDocumentType(const DocType &expr) _inverted = true; res = !res; } - _node.reset(new Constant(res ? "true" : "false")); + _node.reset(new Constant(res)); _resultSet.add(res ? Result::True : Result::False); _priority = DocumentTypePriority; } @@ -411,7 +410,7 @@ SelectPruner::visitFieldValueNode(const FieldValueNode &expr) if (!_hasFields) { // If we're working on removed document sub db then we have no fields. _constVal = true; - _valueNode.reset(new NullValueNode("null")); + _valueNode.reset(new NullValueNode()); _priority = NullValPriority; return; } @@ -511,7 +510,7 @@ SelectPruner::setTernaryConst(bool val) { _constVal = true; _priority = ConstPriority; - _node.reset(new Constant(val ? "true" : "false")); + _node.reset(new Constant(val)); } void |