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

Bruce Robbins commented on SPARK-46373:
---------------------------------------

Maybe due to this (from [the docs|https://spark.apache.org/docs/3.5.0/]):

{quote}Spark runs on Java 8/11/17, Scala 2.12/2.13, Python 3.8+, and R 
3.5+.{quote}

Scala 3 is not listed as a supported version.

> Create DataFrame Bug
> --------------------
>
>                 Key: SPARK-46373
>                 URL: https://issues.apache.org/jira/browse/SPARK-46373
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.5.0
>            Reporter: Bleibtreu
>            Priority: Major
>
> Scala version is 3.3.1
> Spark version is 3.5.0
> I am using spark-core 3.5.1. I am trying to create a DataFrame through the 
> reflection api, but "No TypeTag available for Person" will appear. I have 
> tried for a long time, but I still don't quite understand why TypeTag cannot 
> recognize my Person case class. 
> {code:java}
>     import sparkSession.implicits._
>     import scala.reflect.runtime.universe._
>     case class Person(name: String)
>     val a = List(Person("A"), Person("B"), Person("C"))
>     val df = sparkSession.createDataFrame(a)
>     df.show(){code}
> !https://media.discordapp.net/attachments/839723072239566878/1183747749204725821/image.png?ex=65897600&is=65770100&hm=4eeba8d8499499439590a34260f8b441c6594c572c545f5f61f8dc65beeb6a4b&=&format=webp&quality=lossless&width=1178&height=142!
> I tested it and it is indeed a problem unique to Scala3
> There is no problem on Scala2.13
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to