Skip to content

Commit

Permalink
fix date type convertion in jdbcrdd
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Apr 20, 2015
1 parent e5949c2 commit 3c9184c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ private[sql] class JDBCRDD(
val pos = i + 1
conversions(i) match {
case BooleanConversion => mutableRow.setBoolean(i, rs.getBoolean(pos))
// TODO(davies): convert Date into Int
case DateConversion => mutableRow.update(i, rs.getDate(pos))
case DateConversion =>
mutableRow.update(i, DateUtils.fromJavaDate(rs.getDate(pos)))
case DecimalConversion => mutableRow.update(i, rs.getBigDecimal(pos))
case DoubleConversion => mutableRow.setDouble(i, rs.getDouble(pos))
case FloatConversion => mutableRow.setFloat(i, rs.getFloat(pos))
Expand Down

0 comments on commit 3c9184c

Please sign in to comment.