virtuoso-opensource icon indicating copy to clipboard operation
virtuoso-opensource copied to clipboard

Incorrect query results - Literal value accidentally converted to URI

Open binh-vu opened this issue 1 year ago • 1 comments

Version: 7.2.14

I encounter a problem that literal values accidentally converted to URIs if there is an URI with the same value.

Here is an example for reproducibility.

  1. Insert the data: INSERT { <https://mrdata.usgs.gov/mrds> <https://example.com/uri> "https://mrdata.usgs.gov/mrds" . }.
  2. Query the data: SELECT ?s ?p ?o WHERE { ?s ?p ?o . VALUES ?s { <https://mrdata.usgs.gov/mrds> } }

This is the results in JSON:

{
  "head": {
    "link": [],
    "vars": [
      "s",
      "p",
      "o"
    ]
  },
  "results": {
    "distinct": false,
    "ordered": true,
    "bindings": [
      {
        "s": {
          "type": "uri",
          "value": "https://mrdata.usgs.gov/mrds"
        },
        "p": {
          "type": "uri",
          "value": "https://example.com/uri"
        },
        "o": {
          "type": "uri",
          "value": "https://mrdata.usgs.gov/mrds"
        }
      }
    ]
  }
}

binh-vu avatar Dec 27 '24 02:12 binh-vu

We are looking into this ...

HughWilliams avatar Dec 27 '24 11:12 HughWilliams