Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SPARQL CSV result serialization of blank nodes #1979

Merged
merged 1 commit into from Jun 23, 2022

Conversation

aucampia
Copy link
Member

@aucampia aucampia commented Jun 4, 2022

Summary of changes

This patch fixes SPARQL CSV result serialization of blank nodes.
Previously blank nodes were serialized the same as normal nodes, but
blank nodes should be prefixed with _: as per
https://www.w3.org/TR/sparql11-results-csv-tsv/#csv-terms:

Blank nodes use the _:label form from Turtle and SPARQL.
Use of the same label indicates the same blank node within
the results but has no significance outside the results.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia aucampia marked this pull request as ready for review June 4, 2022 18:13
@coveralls
Copy link

coveralls commented Jun 4, 2022

Coverage Status

Coverage increased (+0.001%) to 88.558% when pulling 762cb3f on aucampia:iwana-20220604T2004-fix_tsv_result into a6e3da4 on RDFLib:master.

@aucampia aucampia requested a review from a team June 4, 2022 18:22
@aucampia aucampia added the review wanted This indicates that the PR is ready for review label Jun 4, 2022
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aucampia aucampia force-pushed the iwana-20220604T2004-fix_tsv_result branch from e9958a0 to 7e5f96c Compare June 8, 2022 19:18
This patch fixes SPARQL CSV result serialization of blank nodes.
Previously blank nodes were serialized the same as normal nodes, but
blank nodes should be prefixed with `_:` as per
<https://www.w3.org/TR/sparql11-results-csv-tsv/#csv-terms>:

> Blank nodes use the `_:label` form from Turtle and SPARQL.
> Use of the same label indicates the same blank node within
> the results but has no significance outside the results.
@aucampia aucampia force-pushed the iwana-20220604T2004-fix_tsv_result branch from 7e5f96c to 762cb3f Compare June 17, 2022 13:20
@aucampia aucampia merged commit 4f96f46 into RDFLib:master Jun 23, 2022
@aucampia aucampia deleted the iwana-20220604T2004-fix_tsv_result branch June 23, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants