Atom based SubsumedCondition

19 views
Skip to first unread message

Alain

unread,
Feb 4, 2019, 12:56:19 PM2/4/19
to hyperg...@googlegroups.com
Hi,

I encountered what I feel might be an issue (or I'm just getting confused).

In HGQuery we have:
public static SubsumedCondition subsumed(Ref<HGHandle> general) {
return new SubsumedCondition(general); }

which leads to:
public void setGeneralValue(Object generalValue)
{
this.generalValue = hg.constant(generalValue);
this.general = null;
if (generalValue != null)
impl = new AtomBased();
}

where we expect to take a Ref<HGHandle> and turn that into a constant
which itself returns a Ref<Object> here. So do we expect a Ref or Ref
or should the argument simply be an object representing the atom?

Cheers,
Alain

Borislav Iordanov

unread,
Feb 4, 2019, 2:00:49 PM2/4/19
to hyperg...@googlegroups.com
Hi,

Yup, it’s a problem. We should be dispatching to setGeneralHandleReference of course with a constructor like this:

public SubsumedCondition(Ref<HGHandle> general)
{
setGeneralHandleReference(general);
}

I just added it…

As usual, thanks a lot for reporting it! :)

Boris
> --
> You received this message because you are subscribed to the Google Groups "HyperGraphDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hypergraphdb...@googlegroups.com.
> To post to this group, send email to hyperg...@googlegroups.com.
> Visit this group at https://groups.google.com/group/hypergraphdb.
> For more options, visit https://groups.google.com/d/optout.

Alain

unread,
Feb 5, 2019, 8:03:12 AM2/5/19
to hyperg...@googlegroups.com
Boris,

That leaves more perplex.

I get it that now you have a matching constructor, but it is setting
the generalHandleReference but that will never lead impl to be set as
in setGeneralValue, so I guess it will fail.

And to me that raise the question of how can we call the AtomBased
predicate from HGQuery?

Cheers,
Alain

Borislav Iordanov

unread,
Feb 5, 2019, 1:39:34 PM2/5/19
to hyperg...@googlegroups.com
Hi,

It’s just another bug, we have to create the implementation :) I will add unit tests to cover those cases. It’s a good opportunity to do that. The Ref<HGHandle> use case was added when compiled queries were implemented and it was being added across the board, so some cases simply remained untested. Sorry about that!

Best,
Boris

Alain

unread,
Feb 5, 2019, 2:04:28 PM2/5/19
to hyperg...@googlegroups.com
Boris,

No problem. I'll look at sending you a couple of pull requests, as
we've addressed a few other things around queries in particular.

Alain

On Tue, Feb 5, 2019 at 1:39 PM Borislav Iordanov

Borislav Iordanov

unread,
Feb 14, 2019, 11:53:30 PM2/14/19
to hyperg...@googlegroups.com
Hi Alain,

I just pushed to that maintenance release1.4 branch.

Cheers,
Boris
Reply all
Reply to author
Forward
0 new messages