View Issue Details

IDProjectCategoryView StatusLast Update
000951810000-004: ServicesSpecpublic2025-09-25 09:49
Reporterjpfr Assigned ToPaul Hunkar  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Product Version1.05.03 
Summary0009518: Automatic Cast to Boolean in EventFilters
Description

The logical operators in an EventFilter where-clause use three distinct truth values, TRUE, FALSE and NULL (cf. Part 4, Table 127 and 128).

TRUE and FALSE are Booleans whereas NULL is indicated by an empty variant.
Part 4 further describes casting to Boolean.
Implicit casting is only possible from String to Boolean (e.g. "false" -> FALSE).
Explicit casting is possible from any numerical type to Boolean (e.g. x != 0 -> TRUE).

In our implementation, we are unsure of the casting rules when calling a logical operator with a non-Boolean.
The standards speaks of an "operand that resolves to a Boolean".

NOT TRUE -> FALSE
NOT NULL -> NULL
NOT "true" -> ???
NOT 1 -> ???
NOT ns=1;i=123 -> ???

Does resolving to a Boolean include automatic casting and also casting of numericals (explicit).
Also, a NULL value is considered an "empty value". Does that mean any non-empty value is non-NULL and resolves to TRUE?

The EventFilter operators that need clarification are AND/OR/NOT/ISNULL.

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Paul Hunkar

2025-06-29 18:26

developer   ~0023045

I believe this is a miss understanding of casting and the eventFilter structures.
If you think of the filter as a table with multiple rows, the first statement is about the results of a row.
Each row has one or more operand(s) and an operator (Like, And, Or, equals etc) Most of the Operators can only resolve to a true/False or NULL. A few provide another function and are used for amore complex operations. The end result is if an event is to be included in what is reported.
The cast applies to individual operands, and there is a table of types of casting is allowed, it clearly states that if something can not be cast to a boolean, it result in a null and rules for a Null apply. It is important to not mix that a cast is for an Operand (which is a parameter for an Operator) and each operator indicate what should be done and if it is allowed.
anything in the table that can not be cast is a null (NodeId in your report). An integer has casting rules -> zero (false) vs any number (True) - Only implicit conversion can be automatically applied.

we see no changes that are required to the specification.

Jim Luth

2025-09-25 09:49

administrator   ~0023358

Agreed to no fix.

Issue History

Date Modified Username Field Change
2024-04-09 08:50 jpfr New Issue
2024-04-23 16:25 Jim Luth Assigned To => Paul Hunkar
2024-04-23 16:25 Jim Luth Status new => assigned
2025-06-29 18:26 Paul Hunkar Status assigned => resolved
2025-06-29 18:26 Paul Hunkar Resolution open => no change required
2025-06-29 18:26 Paul Hunkar Note Added: 0023045
2025-09-25 09:49 Jim Luth Status resolved => closed
2025-09-25 09:49 Jim Luth Note Added: 0023358