Shafaq-Siddiqi commented on a change in pull request #1139:
URL: https://github.com/apache/systemds/pull/1139#discussion_r551350534



##########
File path: 
src/test/java/org/apache/sysds/test/functions/builtin/BuiltinMDTest.java
##########
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.sysds.test.functions.builtin;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.apache.sysds.common.Types;
+import org.apache.sysds.lops.LopProperties;
+import org.apache.sysds.runtime.io.FrameWriter;
+import org.apache.sysds.runtime.io.FrameWriterFactory;
+import org.apache.sysds.runtime.matrix.data.FrameBlock;
+import org.apache.sysds.runtime.util.DataConverter;
+import org.apache.sysds.test.AutomatedTestBase;
+import org.apache.sysds.test.TestConfiguration;
+import org.apache.sysds.test.TestUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(value = Parameterized.class)
+public class BuiltinMDTest extends AutomatedTestBase {
+       private final static String TEST_NAME = "matching_dependency";
+       private final static String TEST_DIR = "functions/builtin/";
+       private static final String TEST_CLASS_DIR = TEST_DIR + 
BuiltinMDTest.class.getSimpleName() + "/";
+       private final static Types.ValueType[] schemaStrings = {
+               Types.ValueType.STRING, Types.ValueType.STRING, 
Types.ValueType.STRING,
+               Types.ValueType.STRING, Types.ValueType.STRING, 
Types.ValueType.STRING};
+
+       @Parameterized.Parameter()
+       public double[][] LHSf;
+
+       @Parameterized.Parameter(1)
+       public double[][] LHSt;
+
+       @Parameterized.Parameter(2)
+       public double[][] RHSf;
+
+       @Parameterized.Parameter(3)
+       public double[][] RHSt;
+
+       @Parameterized.Parameters
+       public static Collection<Object[]> data() {
+               return Arrays.asList(new Object[][] {
+                       {new double[][] {{1}}, new double[][] {{0.95}},
+                               new double[][] {{5}}, new double[][] {{0.65}}},
+
+                       {new double[][] {{1,3}}, new double[][] {{0.7,0.8}},
+                               new double[][] {{5}}, new double[][] {{0.8}}},
+
+                       {new double[][] {{1,4,5}}, new double[][] 
{{0.9,0.9,0.9}},
+                               new double[][] {{6}}, new double[][] {{0.9}}},
+
+                       {new double[][] {{1,4,5}}, new double[][] 
{{0.75,0.6,0.9}},
+                               new double[][] {{3}}, new double[][] {{0.8}}},
+               });
+       }
+
+       @Override
+       public void setUp() {
+               TestUtils.clearAssertionInformation();
+               addTestConfiguration(TEST_NAME, new 
TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] {"D"}));
+               if (TEST_CACHE_ENABLED) {
+                       setOutAndExpectedDeletionDisabled(true);
+               }
+       }
+
+       @Test
+       public void testMD1() {
+               double[][] D =  {
+                       {7567, 231, 1231, 1232, 122, 321},
+                       {5321, 23123, 122, 123, 1232, 11},
+                       {7267, 3, 223, 432, 1132, 0},
+                       {7267, 3, 223, 432, 1132, 500},
+                       {7254, 3, 223, 432, 1132, 0},
+               };

Review comment:
       could you please also create a test case for Spark?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to