-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Thank you for your work on Traqula! It looks very promising, and I'm especially curious to explore the round tripping feature. I'd like to use Traqula in a project where I need to parse many queries on one specific quad store. I tested Traqula with a few hundred queries, and 85% of them pass without issues. The issues I ran into are varied. Some of them are idiosyncracies of the quad store the queries are run against, some might be missing features, one seems to be a small bug. In any case I'd be glad to get your opinion on how to best tackle them. I'm trying to assess how much effort it will take to create a patch that fixes all of them.
- Validation errors
In some cases Traqula is able to parse a query but rejects it for semantic reasons. There seems to exist an option to ignore validation errors and return a JSON object anyway via theskipValidationargument, but I can't get it to work.
try {
parser.parse(sparql, args.skipValidation ? { skipValidation: true } : undefined);
ok++;
if (!args.quiet && ok % 1000 === 0) {
console.log(`Parsed ${ok} ok...`);
}
} catch (e) {
// ...
}
It seems like in @traqula/rules-sparql-1-1/dist/esm/lib/grammar/queryUnit.js, the selectQuery rule calls queryIsGood(ret); unconditionally, without if (!C.skipValidation) guard. Am I doing something wrong?
-
Variables starting with a digit
It seems like Traqula doesn't accept variables that start with a digit. IIIUC those are legal according to spec. Am I wrong, and/or is this how you want it to be? In any case a patch should be reasonably easy. -
Missing WHERE keyword in nested SELECT statements
Again it seems like this is legal in SPARQL, but not supported in Traqula. And again it seems quite easy to patch. What's your take? -
Jena textMatch
Some queries usetextMatchsyntax, an ARQ/Jena text search function / “magic property” that is not part of SPARQL. Do you have ideas on how to support this, or even plans to do so? -
Property path repetition
Some queries use{n}syntax for property path expressions. IIUC this idiom is also used in other RDF stores. Do you have an idea of how it could be supported in Traqula, or even plans to do so? -
LATERAL
Some queries uselateral { select ... }. I guess I'm on my own with that one. [EDIT or maybe not?] -
Aggregate shorthand in SELECT
Some queries usecount(*)without defining a variable name, i.e. omitting theAS ?countpart. That is non-standard syntactic sugar and I don't assume you have any interest in supporting it. Should be easy to patch locally.
I'd be glad to get your opinions on these issues before I start to work on them.