You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Timper (JIRA)" <ji...@apache.org> on 2014/10/08 22:24:34 UTC
[jira] [Commented] (SPARK-3853) JsonRDD does not support converting
fields to type Timestamp
[ https://issues.apache.org/jira/browse/SPARK-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164098#comment-14164098 ]
Michael Timper commented on SPARK-3853:
---------------------------------------
I have a fix, I'll submit a pull request shortly.
> JsonRDD does not support converting fields to type Timestamp
> ------------------------------------------------------------
>
> Key: SPARK-3853
> URL: https://issues.apache.org/jira/browse/SPARK-3853
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.1.0
> Reporter: Michael Timper
>
> create a SchemaRDD using
> eventsSchema = sqlContext.jsonRDD(jsonEventsRdd, schemaWithTimestampField)
> eventsSchema.registerTempTable("events")
> sqlContext.sql("select max(time_field) from events")
> Throws this exception:
> scala.MatchError: TimestampType (of class org.apache.spark.sql.catalyst.types.TimestampType$)
> org.apache.spark.sql.json.JsonRDD$.enforceCorrectType(JsonRDD.scala:357)
> org.apache.spark.sql.json.JsonRDD$$anonfun$org$apache$spark$sql$json$JsonRDD$$asRow$1$$anonfun$apply$12.apply(JsonRDD.scala:391)
> ......
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org