You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by "justin2004 (via GitHub)" <gi...@apache.org> on 2024/11/22 22:48:10 UTC
[I] is this valid sparql or does qparse have a bug? [jena]
justin2004 opened a new issue, #2864:
URL: https://github.com/apache/jena/issues/2864
### Version
5.2.0
### Question
I am able to run this query but qparse can't parse it.
```sparql
PREFIX ex: <http://foobar.com/resource/>
PREFIX fx: <http://sparql.xyz/facade-x/ns/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xyz: <http://sparql.xyz/facade-x/data/>
select *
where {
?s ex:id ?id .
?s ex:name ?name .
bind(iri(concat(str(ex:),"person_",str(MD5(concat(?id,?name))))) as ?thing)
}
```
```bash
$ ~/Downloads/apache-jena-5.2.0/bin/qparse --query query.rq
org.apache.jena.sparql.sse.builders.SSE_ExprBuildException: [5,107]: No known symbol for MD5
at org.apache.jena.sparql.sse.builders.BuilderLib.exception(BuilderLib.java:117)
at org.apache.jena.sparql.sse.builders.BuilderLib.broken(BuilderLib.java:122)
at org.apache.jena.sparql.sse.builders.BuilderLib.broken(BuilderLib.java:109)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:134)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:194)
at org.apache.jena.sparql.sse.builders.BuilderExpr.lambda$static$18(BuilderExpr.java:377)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:135)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:194)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExprListUntagged(BuilderExpr.java:84)
at org.apache.jena.sparql.sse.builders.BuilderExpr.lambda$static$62(BuilderExpr.java:655)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:135)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:194)
at org.apache.jena.sparql.sse.builders.BuilderExpr.lambda$static$72(BuilderExpr.java:734)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:135)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildExpr(BuilderExpr.java:194)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildNamedExpr(BuilderExpr.java:158)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildNamedExprList(BuilderExpr.java:108)
at org.apache.jena.sparql.sse.builders.BuilderExpr.buildNamedExprOrExprList(BuilderExpr.java:100)
at org.apache.jena.sparql.sse.builders.BuilderOp.lambda$new$30(BuilderOp.java:586)
at org.apache.jena.sparql.sse.builders.BuilderOp.build(BuilderOp.java:131)
at org.apache.jena.sparql.sse.builders.BuilderOp.build(BuilderOp.java:60)
at org.apache.jena.sparql.algebra.Algebra.parse(Algebra.java:111)
at org.apache.jena.sparql.algebra.Algebra.parse(Algebra.java:102)
at org.apache.jena.sparql.sse.SSE.parseOp(SSE.java:337)
at org.apache.jena.sparql.util.QueryUtils.checkOp(QueryUtils.java:52)
at org.apache.jena.sparql.util.QueryUtils.checkQuery(QueryUtils.java:39)
at arq.qparse.exec(qparse.java:158)
at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87)
at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56)
at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43)
at arq.qparse.main(qparse.java:66)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] is this valid sparql or does qparse have a bug? [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on issue #2864:
URL: https://github.com/apache/jena/issues/2864#issuecomment-2495430144
@justin2004 Thank you for the report.
`qparse` does more than just parse a query - it parses it, checks it converts to the algebra, converts both query and algebra to a to a string and reparses both of them. It's the parse-algebra last step on the algebra that's failing because the algebra function name has been written in upper case.
Weirdly - this has never worked.
I traced git back to the dawn of time [*] and it's wrong there as well. MD5 and SHA*.
[*] or May 2012 as it's also known, when Jena became a top-level project at Apache (in svn).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] is this valid sparql or does qparse have a bug? [jena]
Posted by "rvesse (via GitHub)" <gi...@apache.org>.
rvesse closed issue #2864: is this valid sparql or does qparse have a bug?
URL: https://github.com/apache/jena/issues/2864
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] is this valid sparql or does qparse have a bug? [jena]
Posted by "justin2004 (via GitHub)" <gi...@apache.org>.
justin2004 commented on issue #2864:
URL: https://github.com/apache/jena/issues/2864#issuecomment-2495009999
even this fails:
```
bind(md5(?id) as ?ll)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org