ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@apache.org>
Subject Re: Issue with adding nested index dynamically
Date Thu, 03 Oct 2019 20:07:11 GMT
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 <kotari4u@gmail.com> 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<String, String> 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/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message