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

Defining multiple variables with @let errors #301

Open
Datseris opened this issue Mar 6, 2020 · 1 comment
Open

Defining multiple variables with @let errors #301

Datseris opened this issue Mar 6, 2020 · 1 comment
Milestone

Comments

@Datseris
Copy link

Datseris commented Mar 6, 2020

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.

@davidanthoff davidanthoff added this to the Backlog milestone Mar 24, 2020
@davidanthoff
Copy link
Member

Yes, that is a nice syntax idea!

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

No branches or pull requests

2 participants