Skip to content

When adding a GraphPatterns.filterNotExists to an empty GraphPatterns.and() when rendering the FILTER NOT EXISTS is lost #5561

@seakayone

Description

@seakayone

Current Behavior

GraphPatterns.and()
.and(
  GraphPatterns.filterNotExists(
   iri("http://example").isA(iri("http://example/Class"))
).getQueryString()

renders
"{ <http://example> a <http://example/Class> . }"

The problem is that the FILTER NOT EXISTS clause is lost.

Expected Behavior

GraphPatterns.and()
.and(
  GraphPatterns.filterNotExists(
   iri("http://example").isA(iri("http://example/Class"))
).getQueryString()

renders
"{ FILTER NOT EXISTS { <http://example> a <http://example/Class> . }"

Steps To Reproduce

See above , I have pushed some example test to my fork: https://github.com/seakayone/rdf4j/pull/1/files

Version

commit fe9c6d5 (at the time of reporting it is main HEAD)

Are you interested in contributing a solution yourself?

Yes

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions