Thanks, guys. Michael Armbrust also suggested the same two approaches.
I believe “getAs[Date]” is available only in 1.2 branch and I have Spark 1.1,
so I am using row(i).asInstanceOf[Date], which works.
Mohammed
From: Shixiong Zhu [mailto:zsxw...@gmail.com]
Sent: Tuesday, October 28, 2014
Can you use row(i).asInstanceOf[]
Thanks.
Zhan Zhang
On Oct 28, 2014, at 5:03 PM, Mohammed Guller moham...@glassbeam.com wrote:
Hi –
The Spark SQL Row class has methods such as getInt, getLong, getBoolean,
getFloat, getDouble, etc. However, I don’t see a getDate method. So how can
Or def getAs[T](i: Int): T
Best Regards,
Shixiong Zhu
2014-10-29 13:16 GMT+08:00 Zhan Zhang zzh...@hortonworks.com:
Can you use row(i).asInstanceOf[]
Thanks.
Zhan Zhang
On Oct 28, 2014, at 5:03 PM, Mohammed Guller moham...@glassbeam.com
wrote:
Hi –
The Spark SQL Row class has