Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E9EC19978 for ; Fri, 1 Apr 2016 08:43:59 +0000 (UTC) Received: (qmail 90235 invoked by uid 500); 1 Apr 2016 08:43:59 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 90193 invoked by uid 500); 1 Apr 2016 08:43:59 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 90182 invoked by uid 99); 1 Apr 2016 08:43:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 08:43:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id AD084C0250 for ; Fri, 1 Apr 2016 08:43:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.772 X-Spam-Level: * X-Spam-Status: No, score=1.772 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id EqH6vpjK_1xI for ; Fri, 1 Apr 2016 08:43:54 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0D2865FB2E for ; Fri, 1 Apr 2016 08:43:54 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id CE051243AA41 for ; Fri, 1 Apr 2016 01:32:26 -0700 (PDT) Date: Fri, 1 Apr 2016 01:30:28 -0700 (PDT) From: F7753 To: user@ignite.apache.org Message-ID: <1459499428511-3849.post@n6.nabble.com> In-Reply-To: <1459494216430-3847.post@n6.nabble.com> References: <1459494216430-3847.post@n6.nabble.com> Subject: Re: How to solve the 22 parameters' limit under scala 2.10 in the case class? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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.