[ 
https://issues.apache.org/jira/browse/SPARK-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164344#comment-14164344
 ] 

Apache Spark commented on SPARK-3853:
-------------------------------------

User 'mtimper' has created a pull request for this issue:
https://github.com/apache/spark/pull/2720

> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to