Skip to content

Instantly share code, notes, and snippets.

@andfanilo
andfanilo / DataFrameTesting.scala
Created May 24, 2016 11:49
An implementation of DataFrame comparison functions from spark-testing-base's DataFrameSuiteBase trait in specs2
package utils
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.types.StructType
import org.apache.spark.sql.{DataFrame, Row}
import org.specs2.matcher.{Expectable, Matcher}
import org.specs2.mutable.Specification
/**
* Utility class to compare DataFrames and Rows inside unit tests