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

Dataset quads and objects don't find the same data #2944

Open
drewp opened this issue Oct 22, 2024 · 1 comment
Open

Dataset quads and objects don't find the same data #2944

drewp opened this issue Oct 22, 2024 · 1 comment

Comments

@drewp
Copy link
Contributor

drewp commented Oct 22, 2024

    g = Dataset()
    g.parse(file=Path('fixed_config.n3').open('rt'), format='n3')
    g.parse(file=Path('ui_selections.n3').open('rt'), format='n3')
    g.parse(source='http://10.43.160.4/graph/currentEvents', format='trig')

            for ev in g.quads((cal, EV['event'], None, None)):
                log.info(f'    found an event1 {ev}')
            for ev in g.objects((cal, EV['event'], None, None)):
                log.info(f'    found an event2 {ev}')

The first log prints once but the second does not. I expected the queries to match the same statements (returning a quad in log1 or a the quad's object node in log2).

@edmondchuc
Copy link
Contributor

What result do you get if you enable default union on the Dataset object?

g = Dataset(default_union=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@drewp @edmondchuc and others