You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2020/02/13 11:21:00 UTC

[jira] [Created] (SPARK-30810) Allows to parse a Dataset having different column from 'value'

Hyukjin Kwon created SPARK-30810:
------------------------------------

             Summary: Allows to parse a Dataset having different column from 'value'
                 Key: SPARK-30810
                 URL: https://issues.apache.org/jira/browse/SPARK-30810
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Hyukjin Kwon


{code}
val ds = spark.range(10).selectExpr("'a, b, c' AS text").as[String]
spark.read.csv(ds).show()
{code}

{code}
org.apache.spark.sql.AnalysisException: cannot resolve '`value`' given input columns: [text];;
'Filter (length(trim('value, None)) > 0)
+- Project [a, b, c AS text#2]
   +- Range (0, 10, step=1, splits=Some(2))
{code}

It fails to create a CSV parsed DataFrame from a String Dataset.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org