[SYSTEMDS-207] Fix dml-builtin-function hoisting from expressions

Function calls to dml-bodied functions need to bind their outputs to
logical variable names and hence require a cut of the basic block for
correctness. To still allow such functions in expressions (which is very
common), we perform function call hoisting from expressions during
parsing in order to be able to cut after entire statements. This
automatically applied to the new dml-bodied builtin functions too, but
because theses functions are loaded before ran into null pointer
exceptions during validation (thanks Arnab for catching this).

This fix extends the function hoisting by probing for dml-bodied builtin
functions and lazily loading, parsing, and adding the required functions
if needed. By reusing the recently added mechanics from lazy function
loading in eval functions, we keep the number of alternative entry
points very small.
5 files changed
tree: 5853db6b0c1fe03b217bd019df42691d7d2b362d
  1. .github/
  2. bin/
  3. conf/
  4. dev/
  5. docker/
  6. docs/
  7. scripts/
  8. src/
  9. .gitattributes
  10. .gitignore
  11. CONTRIBUTING.md
  12. LICENSE
  13. NOTICE
  14. pom.xml
  15. README.md
README.md

SystemDS

Overview: SystemDS is a versatile system for the end-to-end data science lifecycle from data integration, cleaning, and feature engineering, over efficient, local and distributed ML model training, to deployment and serving. To this end, we aim to provide a stack of declarative languages with R-like syntax for (1) the different tasks of the data-science lifecycle, and (2) users with different expertise. These high-level scripts are compiled into hybrid execution plans of local, in-memory CPU and GPU operations, as well as distributed operations on Apache Spark. In contrast to existing systems - that either provide homogeneous tensors or 2D Datasets - and in order to serve the entire data science lifecycle, the underlying data model are DataTensors, i.e., tensors (multi-dimensional arrays) whose first dimension may have a heterogeneous and nested schema.

Documentation: SystemDS Documentation

Status and Build: SystemDS is still in pre-alpha status. The original code base was forked from Apache SystemML 1.2 in September 2018. We will continue to support linear algebra programs over matrices, while replacing the underlying data model and compiler, as well as substantially extending the supported functionalities. Until the first release, you can build your own snapshot via Apache Maven: mvn -DskipTests clean package.

Status

License Build Documentation Component Test Application Test Function Test Python Test