Here are some details:
I created the case class A which parameter is less than 22 and the case
class B which has more than 22 parameters, I want to let ignite to create
index on the fields , so the case class is like:
---------------------------------------------------------------------------------------------------------------------
case class A (
@ScalarCacheQuerySqlField field0: String,
@ScalarCacheQuerySqlField field1: BigInt,
@ScalarCacheQuerySqlField field2: String,
....
@ScalarCacheQuerySqlField field15: String,
)
case class B (
@ScalarCacheQuerySqlField field0: String,
@ScalarCacheQuerySqlField field1: BigInt,
@ScalarCacheQuerySqlField field2: String,
....
@ScalarCacheQuerySqlField field50: String,
)
-------------------------------------------------------------------------------------------------------------------
then I use maven to compile the project, it alert the error:
error: Implementation restriction: case classes cannot have more than 22
parameters.
I found that in scala2.10 you can just create no more than 22 parameters in
a case class, so I try to use StructType to see whether it can solve this,
the code is like:
--------------------------------------------------------------------------------------------------------------------
object Schema{
val A = StructType( Array(
StructField("field0", StringType),
StructField("field1", LongType),
.....
StructField("field15", StringType),
)
val B = StructType( Array(
StructField("field0", StringType),
StructField("field1", LongType),
.....
StructField("field50", StringType),
)
}
--------------------------------------------------------------------------------------------------------------------
How to add the annotation '@ScalarCacheQuerySqlField' ?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-solve-the-22-parameters-limit-under-scala-2-10-in-the-case-class-tp3847p3849.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.