queryverse / queryverse/Query.jl
Defining multiple variables with `@let` errors
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 403
- Forks
- 48
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 6
Description
I am doing a simple query like so:
res = @from row in beatdata begin
@let ms = deduce_bpm(row)
@let σ, d, D_S = music_distances(row.beats, row.pianobeats, ms)
@select {σ=σ, d=d, D_S=D_S, row.band, row.piece, row.task}
@collect DataFrame
end
but I get
ERROR: LoadError: QueryException: identifier expected at (σ, d, D_S)Stacktrace:
[1] find_names_to_put_in_scope(::Expr) at C:\Users\m300808\.julia\packages\Query\AwBtd\src\query_translation.jl:420
[2] find_and_translate_transparent_identifier(::Expr) at C:\Users\m300808\.julia\packages\Query\AwBtd\src\query_translation.jl:429
[3] find_and_translate_transparent_identifier(::Expr) at C:\Users\m300808\.julia\packages\Query\AwBtd\src\query_translation.jl:448 (repeats 2 times)
[4] query_expression_translation_phase_7 at C:\Users\m300808\.julia\packages\Query\AwBtd\src\query_translation.jl:455 [inlined]
[5] translate_query(::Expr) at C:\Users\m300808\.julia\packages\Query\AwBtd\src\query_translation.jl:511
Seems to me that this should be allowed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the query in the issue, then inspect query_translation.jl around line 420, where the stack trace reports the identifier error. Trace how the second @let expression is parsed and translated, and confirm that the example works with multiple assigned variables without breaking existing @let behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100