Author: shawkins
Date: 2011-08-04 13:51:11 -0400 (Thu, 04 Aug 2011)
New Revision: 3363
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
branches/7.4.x/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
Log:
TEIID-1698 fix for + like matching
Modified: branches/7.4.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2011-08-04
17:08:29 UTC (rev 3362)
+++ branches/7.4.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2011-08-04
17:51:11 UTC (rev 3363)
@@ -204,7 +204,7 @@
}
}
- private final static char[] REGEX_RESERVED = new char[] {'$', '(',
')', '*', '.', '?', '[', '\\',
']', '^', '{', '|', '}'}; //in sorted order
+ private final static char[] REGEX_RESERVED = new char[] {'$', '(',
')', '*', '+', '.', '?', '[',
'\\', ']', '^', '{', '|', '}'}; //in
sorted order
private final static MatchCriteria.PatternTranslator LIKE_TO_REGEX = new
MatchCriteria.PatternTranslator(".*", ".", REGEX_RESERVED,
'\\'); //$NON-NLS-1$ //$NON-NLS-2$
private Map elements;
Modified:
branches/7.4.x/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
===================================================================
---
branches/7.4.x/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2011-08-04
17:08:29 UTC (rev 3362)
+++
branches/7.4.x/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2011-08-04
17:51:11 UTC (rev 3363)
@@ -432,4 +432,9 @@
assertEquals(Boolean.TRUE, Evaluator.evaluate(inc));
}
+ @Test public void testLikePlus() throws Exception {
+ Expression ex = TestFunctionResolving.getExpression("'+' like
'+'");
+ assertEquals(Boolean.TRUE, Evaluator.evaluate(ex));
+ }
+
}
Show replies by date