Re: Question on List to DF

2022-03-16 Thread Gourav Sengupta
converter >> implicit def convertListToMyList(list: List): MyList { >> >> …. >> } >> >> when you do >> List("apple","orange","cherry").toDF("fruit") >> >> >> >> Internally, Sca

Re: Question on List to DF

2022-03-16 Thread Bitfox
y, Scala will generate the code as > convertListToMyList(List("apple","orange","cherry")).toDF("fruit") > > > > > > *From: *Bitfox > *Date: *Wednesday, March 16, 2022 at 12:06 AM > *To: *"user @spark" > *Subject: *[EXTER

Re: Question on List to DF

2022-03-16 Thread Lalwani, Jayesh
quot;,"cherry").toDF("fruit") Internally, Scala will generate the code as convertListToMyList(List("apple","orange","cherry")).toDF("fruit") From: Bitfox Date: Wednesday, March 16, 2022 at 12:06 AM To: "user @spark"

Question on List to DF

2022-03-15 Thread Bitfox
I am wondering why the list in scala spark can be converted into a dataframe directly? scala> val df = List("apple","orange","cherry").toDF("fruit") *df*: *org.apache.spark.sql.DataFrame* = [fruit: string] scala> df.show +--+ | fruit| +--+ | apple| |orange| |cherry| +--+ I