From dev-return-47824-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Thu Oct 3 20:07:39 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 33F9218065B for ; Thu, 3 Oct 2019 22:07:39 +0200 (CEST) Received: (qmail 13080 invoked by uid 500); 3 Oct 2019 20:07:38 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 13045 invoked by uid 99); 3 Oct 2019 20:07:38 -0000 Received: from Unknown (HELO mailrelay1-lw-us.apache.org) (10.10.3.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2019 20:07:38 +0000 Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 0C82B5A6D for ; Thu, 3 Oct 2019 20:07:38 +0000 (UTC) Received: by mail-io1-f43.google.com with SMTP id q10so8564650iop.2 for ; Thu, 03 Oct 2019 13:07:38 -0700 (PDT) X-Gm-Message-State: APjAAAWwaDWvuBzutUiMS1ieXz4vvCbVE5n89YlVlDn5WOd46Mxq6Bmd hdQSC6rVmhGszLHoxuIbm+wjckvo1vEyXVB3w9GFLg== X-Google-Smtp-Source: APXvYqxeDBd3eyDdjvLesXkwu5q0jiASNxc4BTA5ufr1flMh6YD60581ZFCekaqAgy6aXUWgY0JTgonWfJnIlqYXCGU= X-Received: by 2002:a92:910a:: with SMTP id t10mr12688872ild.46.1570133257676; Thu, 03 Oct 2019 13:07:37 -0700 (PDT) MIME-Version: 1.0 References: <1570130384686-0.post@n6.nabble.com> In-Reply-To: <1570130384686-0.post@n6.nabble.com> From: Denis Magda Date: Thu, 3 Oct 2019 13:07:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue with adding nested index dynamically To: user@ignite.apache.org, dev Content-Type: multipart/alternative; boundary="00000000000013098f059407233a" --00000000000013098f059407233a Content-Type: text/plain; charset="UTF-8" Hi, thanks for starting this thread! SQL folks, could you please confirm that's neither known nor expected limitation? If that's a real issue then we will just need to go through a standard contribution process. - Denis On Thu, Oct 3, 2019 at 12:19 PM Hemambara wrote: > We have to add indexes on cache dynamically on java pojo with nested > objects. > In the below example we do not have @QuerySqlField. In this case if I try > to > add index on "username" dynamically using "CREATE INDEX" it worked. But if > I > want to add index on "Address.zipcode" - this is not working as we are NOT > creating aliases for these fields which are getting added dynamically. I > see > there is a bug in this implementation. I fixed the bug (please see below) > and rebuilt the jar in my local and it worked fine. Proposing this bug to > this open source community so that it can be fixed in ignite and we can > start using the jar from central repo. We have just started using ignite > and > planning to take this to production. So it would be helpful if we can > implement this bug fix. > > User{ > String userName; > Address address; > > } > > Address{ > String streetName; > String zipcode; > } > > Bug Fix: QueryUtils.class > ------------------------------ > Method name : > ------------------ > QueryBinaryProperty buildBinaryProperty(GridKernalContext ctx, String > pathStr, > Class resType, Map aliases, @Nullable Boolean > isKeyField, boolean notNull, Object dlftVal, > int precision, int scale) > > -------- > > Change from : > ----------------- > String alias = (String)aliases.get(fullName.toString()); > > to : > ----- > String alias = aliases.get(fullName.toString()) == null ? > fullName.toString() : aliases.get(fullName.toString()); > > With this way we will always make sure we have default alias (if not > provided), otherwise aliases on dynamic query fields and dynamic indexes > are > not working properly > > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > --00000000000013098f059407233a--