Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 03217f7

Browse files
authored
Merge pull request #77 from fogrid/master
Add support for LongType & DecimalType in converter
2 parents 60fb1ba + a11a4fb commit 03217f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/scala/com/audienceproject/spark/dynamodb/catalyst/JavaConverter.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ object JavaConverter {
3737
case MapType(keyType, valueType, _) => convertMap(row.getMap(index), keyType, valueType)
3838
case StructType(fields) => convertStruct(row.getStruct(index, fields.length), fields)
3939
case StringType => row.getString(index)
40+
case LongType => row.getLong(index)
41+
case t: DecimalType => row.getDecimal(index, t.precision, t.scale).toBigDecimal
4042
case _ => row.get(index, elementType)
4143
}
4244
}

0 commit comments

Comments
 (0)