Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Jun 14, 2015
1 parent 8ace611 commit 2f2e48c
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

package org.apache.spark.sql.sources

import java.sql.{Timestamp, Date}

import java.sql.{Date, Timestamp}

import org.apache.spark.rdd.RDD
import org.apache.spark.sql._
import org.apache.spark.sql.catalyst.util.DateUtils
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.util.DateTimeUtils
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.UTF8String

Expand Down Expand Up @@ -84,16 +83,16 @@ case class AllDataTypesScan(
i.toDouble,
Decimal(new java.math.BigDecimal(i)),
Decimal(new java.math.BigDecimal(i)),
DateUtils.fromJavaDate(new Date(1970, 1, 1)),
DateUtils.fromJavaTimestamp(new Timestamp(20000 + i)),
DateTimeUtils.fromJavaDate(new Date(1970, 1, 1)),
DateTimeUtils.fromJavaTimestamp(new Timestamp(20000 + i)),
UTF8String.fromString(s"varchar_$i"),
Seq(i, i + 1),
Seq(Map(UTF8String.fromString(s"str_$i") -> InternalRow(i.toLong))),
Map(i -> i.toString),
Map(Map(UTF8String.fromString(s"str_$i") -> i.toFloat) -> InternalRow(i.toLong)),
Row(i, i.toString),
Row(Seq(UTF8String.fromString(s"str_$i"), UTF8String.fromString(s"str_${i + 1}")),
InternalRow(Seq(DateUtils.fromJavaDate(new Date(1970, 1, i + 1))))))
InternalRow(Seq(DateTimeUtils.fromJavaDate(new Date(1970, 1, i + 1))))))
}
}
}
Expand Down

0 comments on commit 2f2e48c

Please sign in to comment.