Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
SystemDS 2.0, SystemDS 2.1
Description
Currently the builtin functions express wired null pointer behaviour if one execute a builtin function more than once with the same arguments, and use the output in side an operation directly
example:
```R
x = func(a,b) - c
y = func(a,b) - d
```
here the secound execution of func crash with a null pointer
currently the workaround is to do:
```R
r = func(a,b)
x = r - c
y = r - d
```
But our compiler should learn how to do this itself.
Note that if the function is called purely then there is no issues:
```R
x = func(a,b)
y = func(a,b)
x = x - c
x = y - d
```
Bug Found in https://github.com/apache/systemds/pull/1240
use that as code base for example:
https://raw.githubusercontent.com/apache/systemds/988d8ef06f0e29ed8490b68f6ad60e00cc1a654e/scripts/builtin/garch.dml