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

Issue with * while using it inside a sub_query #238

Open
ghost opened this issue Sep 20, 2021 · 3 comments
Open

Issue with * while using it inside a sub_query #238

ghost opened this issue Sep 20, 2021 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Sep 20, 2021

Hi, While trying to extract the columns from the below query I'm getting a value error "ValueError: 'posted_dt' is not in list".

  1. SELECT app.acty_dt , base.posted_dt FROM DB.SCH.WTBL app
  2. INNER JOIN( SELECT pro.* FROM DB.SCH.DATET pro INNER JOIN DB.SCH.LIFT lif ON pro.LIFE_SK = lif.LIFE_SK) base
  3. ON app.acty_dt = substr(APP_NR, 1, length(rtrim(APP_NR))-3)
  4. 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.

@collerek
Copy link
Collaborator

I think we support it if you just use *, i think we don't support ones with prefix as of now (like prefix.*).

@collerek collerek added the bug label Sep 20, 2021
@ghost
Copy link
Author

ghost commented Sep 20, 2021

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.

@sumartoyo
Copy link
Contributor

I made a PR for this #296 . Hopefully it can resolve this issue.

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

No branches or pull requests

2 participants