-
Notifications
You must be signed in to change notification settings - Fork 11
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
Atomic roots are not given as a result for an empty query $
#160
Labels
area: result
Improvements in query result reporting
good first issue
Good for newcomers
help wanted
External contributions welcome
type: bug
Something isn't working
Milestone
Comments
Tagging @V0ldek for notifications |
V0ldek
added a commit
that referenced
this issue
Sep 22, 2023
- Previously only object and array roots were supported. Ref: #160
V0ldek
added a commit
that referenced
this issue
Sep 22, 2023
- Previously only object and array roots were supported. Ref: #160
V0ldek
added a commit
that referenced
this issue
Sep 22, 2023
charles-paperman
pushed a commit
that referenced
this issue
Sep 22, 2023
* First jab at atomic roots fix. * feat: fixed empty query on atomic roots - Previously only object and array roots were supported. Ref: #160 * fix invalid span end tests on x86
Fixed in v0.8.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: result
Improvements in query result reporting
good first issue
Good for newcomers
help wanted
External contributions welcome
type: bug
Something isn't working
Package
CLI
Describe the bug
The empty query
$
should return the root of the document. Currently it does that only if the document is a complex object.Minimal Reproducible Example
Command:
rq '$'
Inputs:
"string"
42
true
null
Output:
Expected behavior
The output should be the same as for the documents
{}
and[]
, i.e. a single match of the root. Atomic values are valid JSON documents.Workarounds (optional)
No response
Proposed solution (optional)
Both engines have a dedicated
empty_query
function that special-cases the query$
by looking for an opening character. That's wrong, the actual special case should be checking if the input contains any non-whitespace character.I'm not actually sure it's needed to be special-cased. We should check if we can remove it and let the core code paths deal with it. If not, then the impl of that function should be fixed.
Version of the release
v0.5.0
Rust version
1.70.0
Target triple
x86_64-unkown-linux-gnu
Features enabled
default
Codegen options
No response
Additional context (optional)
No response
The text was updated successfully, but these errors were encountered: