为什么在SparkR中显示数据时会出现NumberFormatException?

时间:2018-01-17 15:02:15

标签: r apache-spark sparkr

我使用SparkR创建Spark 2.2数据框,因此:

df1 <- SparkR::sql("SELECT created_at, user.utc_offset as utc_offset FROM tweets0 
WHERE racist = true ")

它有架构:

root
 |-- created_at: string (nullable = true)
 |-- utc_offset: string (nullable = true)

当我尝试:

showDF(df1, numRows = 20, truncate = TRUE)

head(df1) 我明白了:

ERROR RBackendHandler: showString on 4 failed
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NumberFormatException: For input string: "100.0"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

我错过了什么?

0 个答案:

没有答案