You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mtthsbrr (via GitHub)" <gi...@apache.org> on 2023/09/25 12:41:17 UTC
[GitHub] [superset] mtthsbrr opened a new issue, #25391: Using SQL expression based Custom Column as Dashboard Filter results in invalid Filter Query
mtthsbrr opened a new issue, #25391:
URL: https://github.com/apache/superset/issues/25391
A clear and concise description of what the bug is.
#### How to reproduce the bug
1. Go to 'Custom Columns' in a Dataset and add a new entry with a SQL expression like IF(1=1,1,0)
2. Add this new custom column as a filter to the a dashboard and load it
3. See error: "Cannot load filter" (column my_custom_column does not exist)
### Expected results
Filter being loaded
### Actual results
Error: "Cannot load filter"
#### Screenshots

Also this is the (boiled down) query example we see in our SQL Engine (Spark SQL):
```
SELECT IF(1 = 1, 1, 2) AS `foo`,
IF(1 = 1, 1, 2) AS `foo`,
FROM
(WITH
...
SELECT *
FROM my_table) AS `virtual_table`
GROUP BY IF(1 = 1, 1, 2)
ORDER BY `foo` ASC
```
### Environment
(please complete the following information):
- browser type and version: Version 116.0.5845.188
- superset version: 2.1.0
- python version: 3.9.17
- node.js version: `node -v`
- any feature flags active: nothing related IMHO
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
### Additional context
For some reason Superset is generating a query that uses ORDER BY with an alias with is not possible it seems: https://stackoverflow.com/a/46405611
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Using SQL expression based Custom Column as Dashboard Filter results in invalid Filter Query [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #25391:
URL: https://github.com/apache/superset/issues/25391#issuecomment-2000119948
This seems to be working fine in 3.0 and newer. Granted I was using SQLIte syntax using Shillelagh, so I had to do a CASE statement... but... it seems to work :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Using SQL expression based Custom Column as Dashboard Filter results in invalid Filter Query [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #25391: Using SQL expression based Custom Column as Dashboard Filter results in invalid Filter Query
URL: https://github.com/apache/superset/issues/25391
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org