prql icon indicating copy to clipboard operation
prql copied to clipboard

Can not infer where a column is from but then the error message says that column is available?

Open cottrell opened this issue 1 year ago • 2 comments

What happened?

I'm not sure if this is a real bug or just a strange error message?

PRQL input

from data
join side:left other (other.id== data.id)
into A

from codes
into S

from A
select {
A.val
}

SQL output

Error: 
   ╭─[:7:3]
   │
 7 │   A.val
   │   ──┬──  
   │     ╰──── Cannot infer where `A`.val is from. It could be any of [(119, {}), (116, {})]
   │ 
   │ Help: available columns: `A`.val
───╯

Expected SQL output

Any sql.

MVCE confirmation

  • [X] Minimal example
  • [X] New issue

Anything else?

No response

cottrell avatar Jul 12 '24 21:07 cottrell