Yes and I would recommend it because it can be made generic and reusable too
On Wed, Sep 23, 2015 at 5:37 PM, satish chandra j <jsatishchan...@gmail.com> wrote: > HI Andy, > So I believe if I opt pro grammatically building the schema approach, than > it would not have have any restriction as such in "case Class not allowing > more than 22 Arguments" > > As I need to define a schema of around 37 arguments > > Regards, > Satish Chandra > > On Wed, Sep 23, 2015 at 9:50 AM, Andy Huang <andy.hu...@servian.com.au> > wrote: > >> Alternatively, I would suggest you looking at programmatically building >> the schema >> >> refer to >> http://spark.apache.org/docs/latest/sql-programming-guide.html#programmatically-specifying-the-schema >> >> Cheers >> Andy >> >> On Wed, Sep 23, 2015 at 2:07 PM, Ted Yu <yuzhih...@gmail.com> wrote: >> >>> Can you switch to 2.11 ? >>> >>> The following has been fixed in 2.11: >>> https://issues.scala-lang.org/browse/SI-7296 >>> >>> Otherwise consider packaging related values into a case class of their >>> own. >>> >>> On Tue, Sep 22, 2015 at 8:48 PM, satish chandra j < >>> jsatishchan...@gmail.com> wrote: >>> >>>> HI All, >>>> Do we have any alternative solutions in Scala to avoid limitation in >>>> defining a Case Class having more than 22 arguments >>>> >>>> We are using Scala version 2.10.2, currently I need to define a case >>>> class with 37 arguments but getting an error as "*error: >>>> Implementation restriction: case classes cannot have more than 22 >>>> parameters.*" >>>> >>>> It would be a great help if any inputs on the same >>>> >>>> Regards, >>>> Satish Chandra >>>> >>>> >>>> >>> >> >> >> -- >> Andy Huang | Managing Consultant | Servian Pty Ltd | t: 02 9376 0700 | >> f: 02 9376 0730| m: 0433221979 >> > > -- Andy Huang | Managing Consultant | Servian Pty Ltd | t: 02 9376 0700 | f: 02 9376 0730| m: 0433221979