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

"An error has occured" selection clause #1248

Open
bhornerETHZ opened this issue Jan 19, 2024 · 1 comment
Open

"An error has occured" selection clause #1248

bhornerETHZ opened this issue Jan 19, 2024 · 1 comment
Labels

Comments

@bhornerETHZ
Copy link

Working in the BD lecture cheatsheet 2023 HS' ipynb on the github dataset, I came across an error that I was told to report.

count(distinct-values(json-file("git-archive.json", 10).payload[$$.head eq $$[0].sha]))

Background: I wanted to find the number of events for which the payload head equals to the SHA of the first commit in the payload.

@ghislainfourny
Copy link
Member

Thank @bhornerETHZ for the feedback. Indeed the [0] seems to lead to an error. JSONiq starts counting at 1, however there should not be an error, it should just silently return an empty sequence.

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

No branches or pull requests

2 participants