Skip to content

Commit 9ad45ec

Browse files
authored
Revert "DPL: add wildcards when creating matchers via DataDescriptorMatcher::parse (#5413)" (#5596)
This reverts commit 68461c3.
1 parent 378363c commit 9ad45ec

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

Framework/Core/src/DataDescriptorQueryBuilder.cxx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,6 @@ std::vector<InputSpec> DataDescriptorQueryBuilder::parse(char const* config)
115115
auto lastMatcher =
116116
std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::Just,
117117
StartTimeValueMatcher(ContextRef{0}));
118-
size_t extraNodes = 0;
119-
if (nodes.size() <= 1) {
120-
nodes.push_back(DescriptionValueMatcher{ContextRef{++extraNodes}});
121-
}
122-
if (nodes.size() <= 2) {
123-
nodes.push_back(SubSpecificationTypeValueMatcher{ContextRef{++extraNodes}});
124-
}
125-
126118
for (size_t ni = 0, ne = nodes.size(); ni < ne; ++ni) {
127119
auto& node = nodes[nodes.size() - 1 - ni];
128120
auto tmp = std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::And,
@@ -195,8 +187,6 @@ std::vector<InputSpec> DataDescriptorQueryBuilder::parse(char const* config)
195187
case IN_END_DESCRIPTION: {
196188
if (assignLastStringMatch("description", 16, currentDescription, IN_BEGIN_SUBSPEC)) {
197189
nodes.push_back(DescriptionValueMatcher{*currentDescription});
198-
} else {
199-
nodes.push_back(DescriptionValueMatcher{ContextRef{1}});
200190
}
201191
} break;
202192
case IN_BEGIN_SUBSPEC: {
@@ -206,8 +196,6 @@ std::vector<InputSpec> DataDescriptorQueryBuilder::parse(char const* config)
206196
case IN_END_SUBSPEC: {
207197
if (assignLastNumericMatch("subspec", currentSubSpec, IN_BEGIN_TIMEMODULO)) {
208198
nodes.push_back(SubSpecificationTypeValueMatcher{*currentSubSpec});
209-
} else {
210-
nodes.push_back(SubSpecificationTypeValueMatcher{ContextRef{2}});
211199
}
212200
} break;
213201
case IN_BEGIN_TIMEMODULO: {

Framework/Core/test/test_DataDescriptorMatcher.cxx

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -605,43 +605,3 @@ BOOST_AUTO_TEST_CASE(DataQuery)
605605
<< DataDescriptorMatcher::Op::Just;
606606
BOOST_CHECK_EQUAL(ops.str(), "andorxorjust");
607607
}
608-
609-
BOOST_AUTO_TEST_CASE(CheckOriginWildcard)
610-
{
611-
auto result0 = DataDescriptorQueryBuilder::parse("x:TST");
612-
BOOST_CHECK_EQUAL(result0.size(), 1);
613-
DataDescriptorMatcher expectedMatcher00{
614-
DataDescriptorMatcher::Op::And,
615-
OriginValueMatcher{"TST"},
616-
std::make_unique<DataDescriptorMatcher>(
617-
DataDescriptorMatcher::Op::And,
618-
DescriptionValueMatcher{ContextRef{1}},
619-
std::make_unique<DataDescriptorMatcher>(
620-
DataDescriptorMatcher::Op::And,
621-
SubSpecificationTypeValueMatcher{ContextRef{2}},
622-
std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::Just,
623-
StartTimeValueMatcher{ContextRef{0}})))};
624-
auto matcher = std::get_if<DataDescriptorMatcher>(&result0[0].matcher);
625-
BOOST_REQUIRE(matcher != nullptr);
626-
BOOST_CHECK_EQUAL(expectedMatcher00, *matcher);
627-
}
628-
629-
BOOST_AUTO_TEST_CASE(CheckOriginDescriptionWildcard)
630-
{
631-
auto result0 = DataDescriptorQueryBuilder::parse("x:TST/A");
632-
BOOST_CHECK_EQUAL(result0.size(), 1);
633-
DataDescriptorMatcher expectedMatcher00{
634-
DataDescriptorMatcher::Op::And,
635-
OriginValueMatcher{"TST"},
636-
std::make_unique<DataDescriptorMatcher>(
637-
DataDescriptorMatcher::Op::And,
638-
DescriptionValueMatcher{"A"},
639-
std::make_unique<DataDescriptorMatcher>(
640-
DataDescriptorMatcher::Op::And,
641-
SubSpecificationTypeValueMatcher{ContextRef{1}},
642-
std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::Just,
643-
StartTimeValueMatcher{ContextRef{0}})))};
644-
auto matcher = std::get_if<DataDescriptorMatcher>(&result0[0].matcher);
645-
BOOST_REQUIRE(matcher != nullptr);
646-
BOOST_CHECK_EQUAL(expectedMatcher00, *matcher);
647-
}

0 commit comments

Comments
 (0)