You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Dmitriy Setrakyan <ds...@apache.org> on 2017/09/04 03:31:55 UTC
Re: UPDATE SQL for nested BinaryObject throws exception.
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 <bl...@kss.biglobe.ne.jp> wrote:
> This is a part of the real code that I wrote.
>
> -----------------------------
> List<QueryEntity> 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/
>
Re: UPDATE SQL for nested BinaryObject throws exception.
Posted by afedotov <al...@gmail.com>.
Hi,
FYI. Created tickets related to the subject:
1) https://issues.apache.org/jira/browse/IGNITE-6265
2) https://issues.apache.org/jira/browse/IGNITE-6266
3) https://issues.apache.org/jira/browse/IGNITE-6268
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: UPDATE SQL for nested BinaryObject throws exception.
Posted by afedotov <al...@gmail.com>.
Unfortunately, there is neither documentation nor tests for the subject.
I'll create tickets for adding a corresponding section to the
BinaryMarshaller documentation
as well as for tests covering this part of the functionality.
Kind regards,
Alex
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: UPDATE SQL for nested BinaryObject throws exception.
Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Mon, Sep 4, 2017 at 7:40 AM, afedotov <al...@gmail.com>
wrote:
> Hi,
>
> Actually, flattening the nested properties with aliases works only for one
> level as for now.
> Looks like it's a bug. I'll file a JIRA ticket for this.
>
>
Alex, maybe one level nesting will be enough for some use cases. Is there
an example in documentation somewhere we can all look at? If not, should we
add such documentation?
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: UPDATE SQL for nested BinaryObject throws exception.
Posted by afedotov <al...@gmail.com>.
Hi,
Actually, flattening the nested properties with aliases works only for one
level as for now.
Looks like it's a bug. I'll file a JIRA ticket for this.
Kind regards,
Alex
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/