TypeError: Cannot read property 'token' of undefined
at Object.QueryFilters.runBuiltInCall ( rdfstore/src/query_filters.js:1342:22)
at Object.QueryFilters.runFilter ( rdfstore/src/query_filters.js:395:33)
at Object.QueryFilters.runFilter ( rdfstore/src/query_filters.js:385:36)
at Object.QueryFilters.runOrFunction ( rdfstore/src/query_filters.js:895:32)
at Object.QueryFilters.runFilter ( rdfstore/src/query_filters.js:389:33)
at Object.QueryFilters.runAndFunction ( rdfstore/src/query_filters.js:931:32)
at Object.QueryFilters.runFilter ( rdfstore/src/query_filters.js:391:33)
at rdfstore/src/query_filters.js:186:36 at rdfstore/src/query_engine.js:556:9
at rdfstore/src/utils.js:385:21
Explanation
The engine tries to evaluate the FILTER(...) clause even if the ?label or ?comment variables are not bound. My expectation would be for the complete OPTIONAL clause to fail if there are no bindings for the BGP. You can try the same query in Virtuoso (https://dbpedia.org/sparql) and it will work.
Query
Dataset
The data I'm querying against comes from a full dump of the named graph http://dbpedia.org/ontology/ on the main dbpedia server (https://dbpedia.org/sparql).
Stack
Explanation
The engine tries to evaluate the FILTER(...) clause even if the ?label or ?comment variables are not bound. My expectation would be for the complete OPTIONAL clause to fail if there are no bindings for the BGP. You can try the same query in Virtuoso (https://dbpedia.org/sparql) and it will work.