Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
SystemML 0.13
-
None
Description
The predicate or conditional-expression in the evaluation of the If-expression allows literal numeral values to be part of the predicate. In the parser, if it sees a literal value of 1 then it would be true otherwise it is false; however it is entirely plausible to extend that definition to cover all values > 0 to be true otherwise values < 0 will be interpreted as false.
E.g. this should print No! but instead it prints "Yes!"
scala> val s = dml(""" if(-42) print("Yes!") else print("No!") """)
scala> ml.execute(s)
Yes!
SystemML Statistics:
Total execution time: 0.012 sec.
Number of executed Spark inst: 0.
res0: org.apache.sysml.api.mlcontext.MLResults = None
Attachments
Issue Links
- links to