Skip to content

Commit 730caa6

Browse files
author
Senthil Nathan
committed
Changes done for v1.1.6.
1 parent abc247a commit 730caa6

File tree

6 files changed

+2026
-179
lines changed

6 files changed

+2026
-179
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changes
22

3+
## v1.1.6
4+
* Sep/20/2023
5+
* Made a major redesign to evaluate multi-level nested subexpressions.
6+
* Made plenty of code changes in the expression validation and evaluation sections.
7+
* Added many new trace points to follow the code execution path when troubleshooting.
8+
* Added 14 new multi-level nested subexpression test cases in FunctionalTests.spl.
9+
310
## v1.1.5
411
* Jan/10/2023
512
* Added inline to the C++ function get_tuple_schema_and_attribute_info.

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,25 +240,25 @@ This toolkit came into existence for a specific need with which a large enterpri
240240

241241
5. It allows a rule expression that can refer to boolean, integer, float, string, set, list, map and other nested tuple attributes. In addition to having many built-in data types inside a collection, it allows list of TUPLE by having user defined custom tuple data types inside a list.
242242

243-
6. It allows certain level of subexpression chaining in a rule.
243+
6. It allows certain level of subexpression chaining i.e. nesting in a rule.
244244

245-
a. It supports zero or single or multilevel parenthesis in a given rule.
245+
a. It supports zero or single-level or multi-level parenthesis in a given rule.
246246

247-
b. Via multilevel parenthesis, it allows for evaluating nested rules.
247+
b. Via multi-level parenthesis, it allows for evaluating nested rules.
248248

249249
c. Within a given subexpression, one must use the same logical operators.
250250

251251
d. Zero parenthesis is used in this example rule:
252252

253253
a == 'hi' && b contains 'xyz' && g[4] > 6.7 && id % 8 == 3
254254

255-
e. Single level parenthesis is used within each subexpression in the following example rules:
255+
e. Single-level parenthesis is used within each subexpression in the following example rules:
256256

257257
(a == 'hi') && (b contains 'xyz' || g[4] > 6.7 || id % 8 == 3)
258258

259259
(a == "hi") && (b contains "xyz") && (g[4] > 6.7) && (id % 8 == 3)
260260

261-
f. Multilevel parenthesis is used in the following example rules that are nested:
261+
f. Multi-level parenthesis is used in the following example rules that are made of single-level nested subexpressions:
262262

263263
(a == "hi") && ((b contains "xyz" || g[4] > 6.7) && id % 8 == 3)
264264

@@ -272,6 +272,14 @@ This toolkit came into existence for a specific need with which a large enterpri
272272

273273
(((a == 'hi') || (x <= 5) || (t == 3.14) || (p > 7)) && ((j == 3) && (y < 1) && (r == 9)) && s endsWith 'Nation')
274274

275+
g. Multi-level nested subexpressions are used in the following example rules to make them deeply nested.
276+
277+
((a.transport.plane.airliner equalsCI 'bOeInG') && (a.transport.cars.autoMaker equalsCI 'Enzo Ferrari')) && (((testId equalsCI 'Happy Path') && (a.rack.hw.vendor equalsCI 'Intel')) || (((a.transport.plane.airliner equalsCI 'bOeInG') || (testId equalsCI 'Happy Path')) && (a.transport.cars.autoMaker equalsCI 'Enzo Ferrari')))
278+
279+
(a.transport.plane.airliner equalsCI 'bOeInG' && a.transport.cars.autoMaker equalsCI 'Enzo Ferrari') && ((testId equalsCI 'Happy Path' && a.rack.hw.vendor equalsCI 'Intel') || ((a.transport.plane.airliner equalsCI 'bOeInG2' || testId equalsCI 'Happy Path') && (a.transport.cars.autoMaker equalsCI 'Enzo Ferrari') && (a.transport.plane.airliner equalsCI 'bOeInG')) || (testId equalsCI 'Happy Path' && testId equalsCI 'Happy Path') || (testId equalsCI 'Happy Path7' && testId equalsCI 'Happy Path')) && (testId equalsCI 'Happy Path')
280+
281+
(a.transport.plane.airliner equalsCI 'bOeInG' && (a.transport.cars.autoMaker equalsCI 'Enzo Ferrari' || (testId equalsCI 'Happy Path' || a.rack.hw.vendor equalsCI 'Intel2'))) && ((testId equalsCI 'Happy Path' && a.rack.hw.vendor equalsCI 'Intel') || ((a.transport.plane.airliner equalsCI 'bOeInG2' || testId equalsCI 'Happy Path') && (a.transport.cars.autoMaker equalsCI 'Enzo Ferrari') && (a.transport.plane.airliner equalsCI 'bOeInG')) || (testId equalsCI 'Happy Path' && testId equalsCI 'Happy Path') || (testId equalsCI 'Happy Path7' && testId equalsCI 'Happy Path')) && (testId equalsCI 'Happy Path')
282+
275283
## Source code
276284
The complete C++ logic for the **eval_predicate** function is available in the [eval_predicate.h](impl/include/eval_predicate.h) file of this repository.
277285

com.ibm.streamsx.eval_predicate/EvalPredicateExample.spl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/*
99
==================================================================
1010
First created on: Mar/05/2021
11-
Last modified on: Jan/07/2023
11+
Last modified on: Sep/20/2023
1212

1313
This is an example application that shows how to use the
1414
eval_predicate function to evaluate an SPL expression a.k.a

0 commit comments

Comments
 (0)