Skip to content

Commit

Permalink
Address @chenghao-intel's comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhuai committed Mar 5, 2015
1 parent 2e8734e commit 45e023e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package org.apache.spark.sql.json

import java.sql.{Date, Timestamp}

import org.scalactic.Tolerance._

import org.apache.spark.sql.TestData._
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.functions._
Expand Down Expand Up @@ -566,7 +568,7 @@ class JsonSuite extends QueryTest {
relation.isInstanceOf[JSONRelation],
"The DataFrame returned by jsonFile should be based on JSONRelation.")
assert(relation.asInstanceOf[JSONRelation].path === path)
assert(Math.round(relation.asInstanceOf[JSONRelation].samplingRatio) === 0L)
assert(relation.asInstanceOf[JSONRelation].samplingRatio === (0.49 +- 0.001))

val schema = StructType(StructField("a", LongType, true) :: Nil)
val logicalRelation =
Expand Down

0 comments on commit 45e023e

Please sign in to comment.