【发布时间】:2018-10-28 01:19:23
【问题描述】:
我有一个案例类
case class A(tm: java.time.Instant)
在尝试使用
获取此案例类的 StructType 时ScalaReflection.schemaFor[A].dataType.asInstanceOf[StructType]
我收到以下错误
[error] Exception in thread "main" java.lang.ExceptionInInitializerError
[error] at sample.spark.streaming.StructuredStreaming.main(StructuredStreaming.scala)
[error] Caused by: java.lang.UnsupportedOperationException: Schema for type java.time.Instant is not supported
谁能告诉我如何解决这个问题?我进行了很多搜索,但找不到任何解决此问题的方法。不,我无法更改案例类中的 java.time.Instant 类型。
【问题讨论】:
标签: scala apache-spark spark-structured-streaming