You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/29 23:26:40 UTC
[GitHub] [superset] a-cid opened a new issue #15962: [1.2 regression] [Athena?] Simple Filter generating invalid SQL when filtering on DOUBLE columns
a-cid opened a new issue #15962:
URL: https://github.com/apache/superset/issues/15962
Charts with a simple filter on a column of type DOUBLE generate invalid SQL due to passing the filter value as a string.
The query then fails with an error message such as:
`SYNTAX_ERROR: line 6:22: '>=' cannot be applied to double, varchar(1)`
### Expected results
Generated SQL contains:
`column > 0`
### Actual results
Generated SQL contains:
`column > '0'`
#### Screenshots
![image](https://user-images.githubusercontent.com/834150/127576925-9e38efa3-6cd7-4ef5-a467-01b32d759de4.png)
![image](https://user-images.githubusercontent.com/834150/127576967-60b87630-62ea-4530-9366-cbd1feffd91b.png)
![image](https://user-images.githubusercontent.com/834150/127577411-cc0e8f5a-0cbe-4e04-be39-cb42063de57d.png)
#### How to reproduce the bug
Create a chart that filters on a DOUBLE column.
### Environment
(please complete the following information):
- superset version: 1.2 (pip installed)
- python version: 3.8.10
- node.js version: not installed
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] 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
Problem seems to affect all charts. Not sure if it's exclusive to AWS Athena databases.
--
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
[GitHub] [superset] a-cid closed issue #15962: [1.2 regression] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid closed issue #15962:
URL: https://github.com/apache/superset/issues/15962
--
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
[GitHub] [superset] a-cid commented on issue #15962: [1.2 regression] [Athena?] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid commented on issue #15962:
URL: https://github.com/apache/superset/issues/15962#issuecomment-890128683
Additional details:
This instance was upgraded from 1.0 directly to 1.2
Upgrade procedure was done as described [in the docs](https://superset.apache.org/docs/installation/upgrading-superset).:
```
pip install apache-superset --upgrade
superset db upgrade
superset init
```
--
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
[GitHub] [superset] a-cid edited a comment on issue #15962: [1.2 regression] [Athena?] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid edited a comment on issue #15962:
URL: https://github.com/apache/superset/issues/15962#issuecomment-890128683
Additional details:
This instance was upgraded from 1.0 directly to 1.2
Upgrade procedure was done as described [in the docs](https://superset.apache.org/docs/installation/upgrading-superset):
```
pip install apache-superset --upgrade
superset db upgrade
superset init
```
--
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
[GitHub] [superset] a-cid commented on issue #15962: [1.2 regression] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid commented on issue #15962:
URL: https://github.com/apache/superset/issues/15962#issuecomment-894395865
I've managed to fix the problem by editing superset/db_engine_specs/base.py
In the PyPI version, `column_type_mappings` is missing [entries for float and double which are already in master](https://github.com/apache/superset/blob/772da8de6353f01ea1c64037af9695d5f10b71e4/superset/db_engine_specs/base.py#L202).
This fixes the issue with double type column filters. The issue with boolean filters seems to have a different cause, which I believe is addressed by PR #16107.
--
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
[GitHub] [superset] a-cid edited a comment on issue #15962: [1.2 regression] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid edited a comment on issue #15962:
URL: https://github.com/apache/superset/issues/15962#issuecomment-894395865
I've managed to fix the problem by editing superset/db_engine_specs/base.py
In the PyPI version, `column_type_mappings` is missing [entries for float and double which are already in master](https://github.com/apache/superset/blob/772da8de6353f01ea1c64037af9695d5f10b71e4/superset/db_engine_specs/base.py#L202).
This fixes the issue with double type column filters. The issue with boolean filters seems to have a different cause, which I believe is addressed by PR #16107.
Would be nice to see small fixes for issues like this published to PyPI. But I understand it isn't the recommended deployment method.
--
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
[GitHub] [superset] a-cid commented on issue #15962: [1.2 regression] [Athena?] Simple Filter generating invalid SQL when filtering on DOUBLE columns
Posted by GitBox <gi...@apache.org>.
a-cid commented on issue #15962:
URL: https://github.com/apache/superset/issues/15962#issuecomment-893515330
Problem seems to affect boolean columns as well
--
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