Skip to content

Commit 3836b08

Browse files
authored
Update RddDatasetConversion.scala
1 parent 2590f99 commit 3836b08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/com/sparkTutorial/sparkSql/RddDatasetConversion.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object RddDatasetConversion {
3636
for (response <- responseDataset.rdd.collect()) println(response)
3737
}
3838

39-
def toInt(split: String): Option[Int] = {
40-
if (split.isEmpty) None else Some(Math.round(split.toFloat))
39+
def toInt(split: String): Option[Double] = {
40+
if (split.isEmpty) None else Some(split.toDouble)
4141
}
4242
}

0 commit comments

Comments
 (0)