Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E7AEF200CF6 for ; Mon, 4 Sep 2017 05:32:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E61FC163B51; Mon, 4 Sep 2017 03:32:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 38CCB163B4E for ; Mon, 4 Sep 2017 05:32:41 +0200 (CEST) Received: (qmail 11492 invoked by uid 500); 4 Sep 2017 03:32:40 -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 11483 invoked by uid 99); 4 Sep 2017 03:32:39 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2017 03:32:39 +0000 Received: from mail-qt0-f182.google.com (mail-qt0-f182.google.com [209.85.216.182]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2B72D1A0488 for ; Mon, 4 Sep 2017 03:32:37 +0000 (UTC) Received: by mail-qt0-f182.google.com with SMTP id v20so18461454qtg.3 for ; Sun, 03 Sep 2017 20:32:37 -0700 (PDT) X-Gm-Message-State: AHPjjUhotVN16Ejro7aOSfCeZCvbn9O4Z4N1t5LdCTgidE8YkD4TDacW 4SpI+pqZ0Yw3J6K6HTe5/Z7lfaVmq+M4 X-Google-Smtp-Source: ADKCNb7APYlKXZ9+P1ta3JSrlYDb5seV84F5cXo+EEQMaztTKUviROG4odN2YmITV50MN2ZjwJ6uiywPAnqsJMVxz2E= X-Received: by 10.200.3.143 with SMTP id t15mr13138241qtg.293.1504495956522; Sun, 03 Sep 2017 20:32:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.34.6 with HTTP; Sun, 3 Sep 2017 20:31:55 -0700 (PDT) In-Reply-To: <1504188746233-0.post@n6.nabble.com> References: <1504186335409-0.post@n6.nabble.com> <1504188746233-0.post@n6.nabble.com> From: Dmitriy Setrakyan Date: Sun, 3 Sep 2017 20:31:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: UPDATE SQL for nested BinaryObject throws exception. To: user , dev@ignite.apache.org Content-Type: multipart/alternative; boundary="f4030435a6480e080d055854c34e" archived-at: Mon, 04 Sep 2017 03:32:42 -0000 --f4030435a6480e080d055854c34e Content-Type: text/plain; charset="UTF-8" Cross sending to dev@ Igniters, up until version 1.9, the nested fields were supported by flattening the names. Do we still support it? I cannot seem to find documentation for it. D. On Thu, Aug 31, 2017 at 7:12 AM, takumi wrote: > This is a part of the real code that I wrote. > > ----------------------------- > List entities = new ArrayList<>(); > QueryEntity qe = new QueryEntity(String.class.getName(), "cache"); > qe.addQueryField("attribute.prop1", Double.class.getName(), "prop3"); > qe.addQueryField("attribute.prop2", String.class.getName(), "prop4"); > qe.addQueryField("attribute.prop.prop1", Double.class.getName(), > "prop5"); > qe.addQueryField("attribute.prop.prop2", String.class.getName(), > "prop6"); > > BinaryObject bo =ib.builder("cache").setField("attribute", > ib.builder("cache.attribute") > .setField("prop", > ib.builder("cache.attribute.prop") > .setField("prop1", 50.0, Double.class) > .setField("prop2", "old", String.class)) > .setField("prop1", 50.0, Double.class) > .setField("prop2", "old", String.class)).build(); > > cache.put("key1", bo); > cache.query(new SqlFieldsQuery("update cache set prop4 = 'new' where > prop3 >= 20.0"));//OK > cache.query(new SqlFieldsQuery("update cache set prop6 = 'new' where > prop5 >= 20.0"));//NG > ----------------------------- > > I can update 'prop4' by SQL, but I do not update 'prop6' by SQL. > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > --f4030435a6480e080d055854c34e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Cross sending to dev@

Igniters, up unti= l version 1.9, the nested fields were supported by flattening the names. Do= we still support it? I cannot seem to find documentation for it.

D.

On Thu, Aug 31, 2017 at 7:12 AM, takumi <= blaite@kss.bi= globe.ne.jp> wrote:
This is= a part of the real code that I wrote.

-----------------------------
=C2=A0 List<QueryEntity> entities =3D new ArrayList<>();
=C2=A0 QueryEntity qe =3D new QueryEntity(String.class.getName(), &quo= t;cache");
=C2=A0 qe.addQueryField("attribute.prop1", Double.class.getN= ame(), "prop3");
=C2=A0 qe.addQueryField("attribute.prop2", String.class.getN= ame(), "prop4");
=C2=A0 qe.addQueryField("attribute.prop.prop1", Double.class= .getName(), "prop5");
=C2=A0 qe.addQueryField("attribute.prop.prop2", String.class= .getName(), "prop6");

=C2=A0 BinaryObject bo=C2=A0 =3Dib.builder("cache").setField("attribute",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ib.builder("cache.attribute")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setField("prop",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ib.builder("ca= che.attribute.prop")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.setFi= eld("prop1", 50.0, Double.class)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.setFi= eld("prop2", "old", String.class))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setField("prop1", 50.0, Doubl= e.class)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setField("prop2", "old&q= uot;, String.class)).build();

=C2=A0 cache.put("key1", bo);
=C2=A0 cache.query(new SqlFieldsQuery("update cache set prop4 =3D '= ;new'=C2=A0 where
prop3 >=3D 20.0"));//OK
=C2=A0 cache.query(new SqlFieldsQuery("update cache set prop6 =3D '= ;new'=C2=A0 where
prop5 >=3D 20.0"));//NG
-----------------------------

I can update 'prop4' by SQL, but I do not update 'prop6' by= SQL.

--f4030435a6480e080d055854c34e--