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

Expression columns do not work in where clause #75

Open
sukhwinder33445 opened this issue Aug 29, 2022 · 1 comment · May be fixed by #81
Open

Expression columns do not work in where clause #75

sukhwinder33445 opened this issue Aug 29, 2022 · 1 comment · May be fixed by #81
Assignees
Labels
bug Something isn't working

Comments

@sukhwinder33445
Copy link
Contributor

If a column has expression as value, the column does not exist in where clause.

Example:

Table news has a expression column sent. Filter creates the following query:

SELECT news.id,
       news.title,
       news.sent_on,
       (CASE WHEN news.sent_on IS NOT NULL THEN 1 ELSE 0 END) AS sent,
FROM news
WHERE news.sent = 1 // column sent does not exist here
ORDER BY news.sent_on DESC;

Additional:

Have a look at this Stack Overflow example

@nilmerg
Copy link
Member

nilmerg commented Oct 12, 2022

@sukhwinder33445 @yhabteab Please check if the linked PR works for you.

@nilmerg nilmerg added this to the v0.4.2 milestone Oct 13, 2022
@nilmerg nilmerg removed this from the v0.5.0 milestone Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants