Last active
August 29, 2015 14:26
-
-
Save zero323/df674b939d3bbd109e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import org.apache.spark.sql.Row$) | |
(import scala.collection.JavaConversions) | |
(import org.apache.spark.sql.RowFactory) | |
(defn vec->row1 [v] | |
(let [s (-> v JavaConversions/asScalaBuffer .toSeq)] | |
(.fromSeq Row$/MODULE$ s))) | |
(defn vec->row2 [v] | |
(RowFactory/create (into-array Object v))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment