Issue with * while using it inside a sub_query
Hi, While trying to extract the columns from the below query I'm getting a value error "ValueError: 'posted_dt' is not in list".
- SELECT app.acty_dt , base.posted_dt FROM DB.SCH.WTBL app
- INNER JOIN( SELECT pro.* FROM DB.SCH.DATET pro INNER JOIN DB.SCH.LIFT lif ON pro.LIFE_SK = lif.LIFE_SK) base
- ON app.acty_dt = substr(APP_NR, 1, length(rtrim(APP_NR))-3)
- AND base.posted_dt >= '2021-09-01
The reason for the error is that because posted_dt date column is not explicitly mentioned inside the sub_query base, But the posted_dt column is present in the table DATET and inside the sub_query base the table DATET is called by using the * (Refer line 2).
If the Parser provides a way to handle this situation it would be great.
I think we support it if you just use *, i think we don't support ones with prefix as of now (like prefix.*).
Yeah I'm able to retrieve the columns if I remove the perfix. Anyway hope a fix will be implemented to parse the perfix.* as well.
I made a PR for this #296 . Hopefully it can resolve this issue.