Repository: ad-freiburg/qlever (language: python)

Issue:
Support for isURI spelling
When I try to eval a query with the filter:
```
FILTER(isURI(?x))
```
I get the following error message:
```
ERROR: Invalid SPARQL query: Built-in function "isuri"  not yet implemented; if you need it, just add it to SparqlQleverVisitor.cpp::visitTypesafe(Parser::BuiltInCallContext following the already implemented functions there
```
Checking [SparqlQleverVisitor.cpp](https://github.com/ad-freiburg/qlever/blob/4a18d3ba33364864817ac705b0c1db33066910cb/src/parser/sparqlParser/SparqlQleverVisitor.cpp#L2076) I see that the parser expects "isIRI":
```
  } else if (functionName == "isiri") {
    return createUnary(&makeIsIriExpression);
```
Can you add support for "isURI"? Is it simply a matter of adding an || to that else-if clause?

I'm trying to run queries that are automatically generated and which use "isURI" instead of "isIRI".
Note that SPARQL 1.1 [supports both spellings](https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#func-isIRI).


Discussion / hints:

Fix patch:
diff --git a/src/parser/sparqlParser/SparqlQleverVisitor.cpp b/src/parser/sparqlParser/SparqlQleverVisitor.cpp
index 67c353155..cfb47e765 100644
--- a/src/parser/sparqlParser/SparqlQleverVisitor.cpp
+++ b/src/parser/sparqlParser/SparqlQleverVisitor.cpp
@@ -2076,7 +2076,7 @@ ExpressionPtr Visitor::visit([[maybe_unused]] Parser::BuiltInCallContext* ctx) {
   } else if (functionName == "concat") {
     AD_CORRECTNESS_CHECK(ctx->expressionList());
     return makeConcatExpression(visit(ctx->expressionList()));
-  } else if (functionName == "isiri") {
+  } else if (functionName == "isiri" || functionName == "isuri") {
     return createUnary(&makeIsIriExpression);
   } else if (functionName == "isblank") {
     return createUnary(&makeIsBlankExpression);


Test patch:
diff --git a/test/SparqlAntlrParserTest.cpp b/test/SparqlAntlrParserTest.cpp
index 3798adde8..fde14dd6b 100644
--- a/test/SparqlAntlrParserTest.cpp
+++ b/test/SparqlAntlrParserTest.cpp
@@ -1425,6 +1425,7 @@ TEST(SparqlParser, builtInCall) {
   expectBuiltInCall("floor(?x)", matchUnary(&makeFloorExpression));
   expectBuiltInCall("round(?x)", matchUnary(&makeRoundExpression));
   expectBuiltInCall("ISIRI(?x)", matchUnary(&makeIsIriExpression));
+  expectBuiltInCall("ISUri(?x)", matchUnary(&makeIsIriExpression));
   expectBuiltInCall("ISBLANK(?x)", matchUnary(&makeIsBlankExpression));
   expectBuiltInCall("ISLITERAL(?x)", matchUnary(&makeIsLiteralExpression));
   expectBuiltInCall("ISNUMERIC(?x)", matchUnary(&makeIsNumericExpression));