This is an automated email from the ASF dual-hosted git repository.

mboehm7 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemml.git


The following commit(s) were added to refs/heads/master by this push:
     new d8c9495  [MINOR] Fix BuiltinFunctionExpression
d8c9495 is described below

commit d8c9495ae6d8e0507d113718b23dfd8fa5035e6d
Author: Sebastian <baunsga...@tugraz.at>
AuthorDate: Wed Jun 3 18:57:30 2020 +0200

    [MINOR] Fix BuiltinFunctionExpression
    
    Closes #937.
    Closes #944.
---
 .../java/org/apache/sysds/parser/BuiltinFunctionExpression.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/src/main/java/org/apache/sysds/parser/BuiltinFunctionExpression.java 
b/src/main/java/org/apache/sysds/parser/BuiltinFunctionExpression.java
index 96e2ebc..b358396 100644
--- a/src/main/java/org/apache/sysds/parser/BuiltinFunctionExpression.java
+++ b/src/main/java/org/apache/sysds/parser/BuiltinFunctionExpression.java
@@ -912,6 +912,14 @@ public class BuiltinFunctionExpression extends 
DataIdentifier
                case NROW:
                case NCOL:
                case LENGTH:
+                       checkNumParameters(1);
+                       checkDataTypeParam(getFirstExpr(), 
+                               DataType.FRAME, DataType.LIST, DataType.MATRIX);
+                       output.setDataType(DataType.SCALAR);
+                       output.setDimensions(0, 0);
+                       output.setBlocksize(0);
+                       output.setValueType(ValueType.INT64);
+                       break;
                case COUNT_DISTINCT:
                case COUNT_DISTINCT_APPROX:
                        checkNumParameters(1);

Reply via email to