You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "e89ff95a (JIRA)" <ji...@apache.org> on 2017/01/03 12:32:58 UTC
[jira] [Created] (SPARK-19056) Row encoder should accept optional
types
e89ff95a created SPARK-19056:
--------------------------------
Summary: Row encoder should accept optional types
Key: SPARK-19056
URL: https://issues.apache.org/jira/browse/SPARK-19056
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.1.0, 2.0.0, 2.2.0
Reporter: e89ff95a
Since Spark 2.0 Spark doesn't accept optional types with `RowEncoder`:
{code}
import org.apache.spark.sql.types._
import org.apache.spark.sql.Row
spark.createDataFrame(
sc.parallelize(Seq(Row(None))),
StructType(Seq(StructField("v", StringType, true)))
).first
// Caused by: java.lang.RuntimeException: Error while encoding: java.lang.RuntimeException: scala.None$ is not a valid external type for schema of string
{code}
--
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