Hi Johan,
Is the ORDER BY condition projected by your SPARQL query? What is the error message?
The DISTINCTs are inserted most likely due to missing unique constraints, which needs to be specified manually with Databricks.
However beware that aggregations may give wrong results if you have some denormalized data.
The DISTINCTs are inserted to guarantee that the virtual graph does not contain duplicated triples, as an RDF graph should be a set of triples.
We need to double-check but the issue 411 has probably been fixed already.
Best,
Benjamin