When doing reification inside a CONSTRUCT clause with partial statements, as documented here, BQL yields a parsing error if a breakline is used before the partial statements.
To illustrate, the following code for reification with CONSTRUCT works:
CONSTRUCT {
?ancestor "grandparent"@[] ?grandchildren ; "both_live_in"@[] /city<NY>
}
INTO ?grandparents
FROM ?family
WHERE {
?ancestor "parent_of"@[] ?c .
?c "parent_of"@[] ?grandchildren
};
But the following code does not:
CONSTRUCT {
?ancestor "grandparent"@[] ?grandchildren ;
"both_live_in"@[] /city<NY>
}
INTO ?grandparents
FROM ?family
WHERE {
?ancestor "parent_of"@[] ?c .
?c "parent_of"@[] ?grandchildren
};
Yielding the following error message:
Processing statement (3/6):
CONSTRUCT { ?ancestor "grandparent"@[] ?grandchildren ;
[FAIL] [ERROR] Failed to parse BQL statement with error Parser.parse: Failed to consume symbol CONSTRUCT_FACTS, with error Parser.parse: Failed to consume symbol CONSTRUCT_TRIPLES, with error Parser.parse: Failed to consume symbol MORE_CONSTRUCT_PREDICATE_OBJECT_PAIRS, with error Parser.parse: Failed to consume symbol CONSTRUCT_PREDICATE, with error Parser.consume: could not consume token (EOF, , ) in production CONSTRUCT_PREDICATE
Processing statement (4/6):
"both_live_in"@[] /city<NY> } INTO ?grandparents FROM ?family WHERE { ?ancestor "parent_of"@[] ?c . ?c "parent_of"@[] ?grandchildren };
[FAIL] [ERROR] Failed to parse BQL statement with error Parser.consume: could not consume token (PREDICATE, "both_live_in"@[], ) in production START
It may be related with this part of the grammar.
You can use the code in the file below to reproduce the aforementioned error.
reification_breakline_error.pdf
When doing reification inside a CONSTRUCT clause with partial statements, as documented here, BQL yields a parsing error if a breakline is used before the partial statements.
To illustrate, the following code for reification with CONSTRUCT works:
But the following code does not:
Yielding the following error message:
It may be related with this part of the grammar.
You can use the code in the file below to reproduce the aforementioned error.
reification_breakline_error.pdf