Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6181#discussion_r30457649
  
    --- Diff: 
mllib/src/test/java/org/apache/spark/ml/feature/JavaWord2VecSuite.java ---
    @@ -0,0 +1,66 @@
    +package org.apache.spark.ml.feature;
    +
    +import com.google.common.collect.Lists;
    +import org.junit.After;
    +import org.junit.Assert;
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +import org.apache.spark.api.java.JavaRDD;
    +import org.apache.spark.api.java.JavaSparkContext;
    +import org.apache.spark.mllib.linalg.Vector;
    +import org.apache.spark.mllib.linalg.VectorUDT;
    +import org.apache.spark.mllib.linalg.Vectors;
    +import org.apache.spark.sql.DataFrame;
    +import org.apache.spark.sql.Row;
    +import org.apache.spark.sql.RowFactory;
    +import org.apache.spark.sql.SQLContext;
    +import org.apache.spark.sql.types.*;
    +
    +public class JavaWord2VecSuite {
    +  private transient JavaSparkContext jsc;
    +  private transient SQLContext sqlContext;
    +
    +  @Before
    +  public void setUp() {
    +    jsc = new JavaSparkContext("local", "JavaWord2VecSuite");
    +    sqlContext = new SQLContext(jsc);
    +  }
    +
    +  @After
    +  public void tearDown() {
    +    jsc.stop();
    +    jsc = null;
    +  }
    +
    +  @Test
    +  public void testJavaWord2Vec() {
    +    JavaRDD<Row> jrdd = jsc.parallelize(Lists.newArrayList(
    +      RowFactory.create(Lists.newArrayList("Hi I heard about 
Spark".split(" ")),
    +        Vectors.dense(0.017877750098705292, -0.018388677015900613, 
-0.01183266043663025)),
    --- End diff --
    
    Let's not check correctness in Java.  Please just make sure that each 
element of the API can be called successfully.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to