BIND (I might be a bit premature here)

7 views
Skip to first unread message

Robert Syme

unread,
May 15, 2012, 1:21:20 AM5/15/12
to 4store-...@googlegroups.com
I know that BIND support in 4store is still very fresh (6 days ago) and very much pre-alpha, but I just wanted to check that I was using it correctly.

I've got 4store bleeding edge (github master:HEAD) accepting queries like:

SELECT * WHERE {
 ?s ?p ?o
 BIND("foo" as ?bar)
} LIMIT 2

where the bar variable appears in the sparql head tag, but not in the results (see below).

Am I just too early for this feature or am I missing something? I don't mean to appear pushy or demanding, I do accept that BIND support is very new (and thanks for working on it!).

<head>
<variable name="s"/>
<variable name="p"/>
<variable name="o"/>
<variable name="bar"/>
</head>
<results>
<result>
<binding name="s">
<uri>uri goes here</uri>
</binding>
<binding name="p">
<uri>uri goes here</uri>
</binding>
<binding name="o">
<uri>uri goes here</uri>
</binding>
</result>
</results>
</sparql>

Steve Harris

unread,
May 15, 2012, 4:29:16 AM5/15/12
to 4store-...@googlegroups.com
No, that's great, it's called testing :)

OK, that looks like a bug, I think I only tested it with expressions with variables in them (e.g. STR(?s)), so I'll try this.

Cheers,
   Steve

--
You received this message because you are subscribed to the Google Groups "4store-support" group.
To view this discussion on the web visit https://groups.google.com/d/msg/4store-support/-/jqid_7YylBYJ.
To post to this group, send email to 4store-...@googlegroups.com.
To unsubscribe from this group, send email to 4store-suppor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/4store-support?hl=en.

-- 
Steve Harris, CTO
Garlik, a part of Experian 
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 653331 VAT # 887 1335 93
Registered office: Landmark House, Experian Way, NG2 Business Park, Nottingham, Nottinghamshire, England NG80 1ZZ

Rob Syme

unread,
May 15, 2012, 4:32:51 AM5/15/12
to 4store-...@googlegroups.com
Ha! Very happy to be of "assistance". I'll keep an eye on the repo and pull down changes as they come in.
Thanks Steve
-r

Steve Harris

unread,
May 15, 2012, 4:34:01 AM5/15/12
to 4store-...@googlegroups.com
Actually, it does work with 4store HEAD, perhaps your version of rasqal isn't new enough? I'm using 0.9.28 here.

Example:

SELECT ?x ?b WHERE { ?x ?y ?z BIND("foo" AS ?b) } ORDER BY ?x

?x          ?b
<foo:a>     "foo"
<foo:a>     "foo"
<foo:a>     "foo"
<foo:a>     "foo"
<foo:a>     "foo"
<foo:a>     "foo"
...

- Steve

On 15 May 2012, at 06:21, Robert Syme wrote:

--
You received this message because you are subscribed to the Google Groups "4store-support" group.
To view this discussion on the web visit https://groups.google.com/d/msg/4store-support/-/jqid_7YylBYJ.
To post to this group, send email to 4store-...@googlegroups.com.
To unsubscribe from this group, send email to 4store-suppor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/4store-support?hl=en.

Rob Syme

unread,
May 15, 2012, 4:41:40 AM5/15/12
to 4store-...@googlegroups.com
So sorry Steve, you're absolutely right. Some rouge symlinks were pointing me to an old 4store install. Everything seems to work as expected when I'm *actually* querying using master:HEAD.

4store>SELECT ?x ?b WHERE { ?x ?y ?z BIND("foo" AS ?b) } LIMIT 2
   >#EOQ
?x ?b
#EOR

-r

Steve Harris

unread,
May 15, 2012, 7:14:15 AM5/15/12
to 4store-...@googlegroups.com
Ha, OK, great.

I hadn't actually tested constant LHS in BIND, so it was completely believable that it didn't work :)

If you're doing anything exotic with BIND, do report back if you find anything odd (obviously), or if it works as expected, it's useful information for timing the next release.

- Steve

Rob Syme

unread,
May 15, 2012, 7:22:12 AM5/15/12
to 4store-...@googlegroups.com
Actually, I think I got 4store to segfault before leaving work (trying to do something funky with BIND). I'm just trying to sort out a test dataset to narrow it down. I'll be in touch ;)
-r 
Reply all
Reply to author
Forward
0 new messages