Bug #4462
NOW with comparison operators
0%
History
#2 Updated by Constantin Asofiei over 6 years ago
- Start date deleted (
12/10/2019)
There is a bug in FWD, where a comparison like dt > NOW (where dt is datetime) fails with Incompatible data types in expression or assignment. (223) error. This is allowed in 4GL, but only if NOW is a standalone operand, not part of an expression. I have a pending fix for this (which will be in 3809e), where I just emit datetime.now() instead of datetimetz.now(), for this case.
Another variation is h::f-dt > NOW - 1 (where f-dt is datetime) - here, even if NOW is part of an expression, the comparison is successful in 4GL. In FWD, we would need to emit this as a dynamic compare operator, which will allow the datetime and datetime-tz (to which NOW is converted implicitly in FWD) to be comparable. I haven't seen this in the customer apps I've been working, so I'm postponing this part.
#3 Updated by Constantin Asofiei over 6 years ago
The fix is in 3809e rev 11435 . The dereference problem (actually any POLY operand) is still postponed.