Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[SPARK-4985][SQL Parquet] Fix 'Unsupported datatype DateType, cannot …
…write to consumer'
  • Loading branch information
alexbaretta committed Jan 14, 2015
commit 929f294d9284ccb09c615823f95d006aa899edd8
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ private[parquet] class MutableRowWriteSupport extends RowWriteSupport {
case DoubleType => writer.addDouble(record.getDouble(index))
case FloatType => writer.addFloat(record.getFloat(index))
case BooleanType => writer.addBoolean(record.getBoolean(index))
case DateType => writer.addInteger(record.getAs[java.sql.Date](index).getTime.toInt)
case d: DecimalType =>
if (d.precisionInfo == None || d.precisionInfo.get.precision > 18) {
sys.error(s"Unsupported datatype $d, cannot write to consumer")
Expand Down