problem
This error occurs when the case class parameter exceeds 22.
Case classes cannot has more than parameters
The case class has a maximum of 22 parameters at the time of the Scala 2.11.x version, and if this parameter cannot be upgraded (for example, current Spark relies on 2.10.x) What do I do? Solution Solutions
Here's an example of 26 parameters, the rest of the situation, and so on
Class ABC (a:string, b:string, c:string, D:long, E: Long, f:map[string,string], g:list[string], h:list[string], i:list [String], j:list[string], k:list[string], l:list[string], m:list[s Tring], n:list[string], o:list[string], p:list[string], q:list[str ING], r:list[string], s:list[string], t:list[string], U:list[strin G], v:list[string], w:list[string], x:list[map[string,string]], y: List[map[string,string]] [z:list[map[string,string]]) extends Product with Scala. Serializable {def productelement (n:int) = n Match {case 0 + a case 1 + B case 2 + C case
3 = d Case 4 = e Case 5 = f Case 6 = g Case 7 = h Case 8 = I case 9 = J Case ten = K case One ---M case----N case----case--P-case--+-Q case, +-R Case 1 8 = s case, and t case x = u case (v case) = W Case 24 = = y case + z} def canequal (that:any) = That.isinstanceof[abc] def productarity = 26}//After using new ABC (...) Resolve the issue