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/01/05 23:44:03 UTC

[GitHub] [superset] zuzana-vej opened a new issue #12293: When switching from Simple to Custom SQL for a filter, it translates INT to string

zuzana-vej opened a new issue #12293:
URL: https://github.com/apache/superset/issues/12293


   Simple SQL correctly encodes the values as INTegers. and technically it's displaying incorrectly `views IN ('5', '10')` even though it's encoded correctly and the query is working - therefore this is a minor issue but can confuse users. 
   
   
   ### Expected results
   Displayed as integer in the Custom SQL box.
   
   ### Actual results
   Transforms into string in the Custom SQL box.
   
   #### Screenshots
   Filter:
   ![Screen Shot 2021-01-05 at 3 36 22 PM](https://user-images.githubusercontent.com/61221714/103711484-65540700-4f6c-11eb-8564-6a1562253c39.png)
   
   Generated SQL Query
   ![Screen Shot 2021-01-05 at 3 37 02 PM](https://user-images.githubusercontent.com/61221714/103711505-713fc900-4f6c-11eb-8c8d-90d6e6d9fcc1.png)
   
   
   #### How to reproduce the bug
   
   1. Go to Explore
   2. Create chart and go to WHERE filter box
   3. Specify multiple IN integer values
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `master`
   - python version: `python --version`
   - node.js version: `node -v`
   
   ### 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.
   - [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
   
   This has been introduced a while back - some time in September, but user consider it a feature request, not a bug. 
   


----------------------------------------------------------------
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.

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] villebro commented on issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-756770953


   FYI this was an old bug, not a regression caused by recent changes.


----------------------------------------------------------------
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.

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] villebro closed issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
villebro closed issue #12293:
URL: https://github.com/apache/superset/issues/12293


   


----------------------------------------------------------------
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.

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] villebro commented on issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-756770953


   FYI this was an old bug, not a regression caused by recent changes.


----------------------------------------------------------------
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.

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] junlincc commented on issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-756382758


   There are few other issues(old or regression) around this area that we would like to address together. Tagging this issue `Hold!` and removing original assignee @michael-s-molina, thanks for all the investigation and testing! 
   
   Problem 1
   Select a simple text filter like City
   Switch to Custom SQL and change the value
   It will present an error because the generated WHERE clause is invalid
   To fix the user has to enter the quotes and double quotes manually
   <img width="1789" alt="Screen Shot 2021-01-07 at 4 08 31 PM" src="https://user-images.githubusercontent.com/67837651/103944048-f4d1f500-50e7-11eb-9920-0c57d5393dcc.png">
   <img width="1784" alt="Screen Shot 2021-01-07 at 4 09 17 PM" src="https://user-images.githubusercontent.com/67837651/103944080-fbf90300-50e7-11eb-8528-6fde02cc6822.png">
   <img width="1778" alt="Screen Shot 2021-01-07 at 4 10 18 PM" src="https://user-images.githubusercontent.com/67837651/103944099-02877a80-50e8-11eb-9b5d-d3e1d35d6b42.png">
   
   Problem 2:
   Create a new Custom SQL filter like “City” = ‘Las Vegas’
   Switch to Simple and fill a different filter like Month = 10
   Switch back to Custom SQL and you will see that the value showing is “City” = ‘Las Vegas’ but if you select the text area the value will change to Month = 10
   <img width="1777" alt="Screen Shot 2021-01-07 at 4 21 38 PM" src="https://user-images.githubusercontent.com/67837651/103944165-18953b00-50e8-11eb-9845-0be484e9c8da.png">
   <img width="1775" alt="Screen Shot 2021-01-07 at 4 22 30 PM" src="https://user-images.githubusercontent.com/67837651/103944171-1af79500-50e8-11eb-9381-c276ef864945.png">
   
   Problem 3:
   Enable filter suggestions in dataset configuration
   Select a date as a filter
   All the suggestions are in a format not accepted by the database which will result in an error
   <img width="1779" alt="Screen Shot 2021-01-07 at 4 05 37 PM" src="https://user-images.githubusercontent.com/67837651/103943917-c3592980-50e7-11eb-85a2-4c0622826269.png">
   
   cc @villebro @kgabryje 
   FYI @eugeniamz 
   
   
   
   


----------------------------------------------------------------
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.

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] junlincc removed a comment on issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
junlincc removed a comment on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-756387363


   > There are few other issues(old or regression) around this area that we would like to address together. Tagging this issue `Hold!` and removing original assignee @michael-s-molina, thanks for all the investigation and testing!
   > 
   > Problem 1
   > Select a simple text filter like City
   > Switch to Custom SQL and change the value
   > It will present an error because the generated WHERE clause is invalid
   > To fix the user has to enter the quotes and double quotes manually
   > <img alt="Screen Shot 2021-01-07 at 4 08 31 PM" width="1789" src="https://user-images.githubusercontent.com/67837651/103944048-f4d1f500-50e7-11eb-9920-0c57d5393dcc.png">
   > <img alt="Screen Shot 2021-01-07 at 4 09 17 PM" width="1784" src="https://user-images.githubusercontent.com/67837651/103944080-fbf90300-50e7-11eb-8528-6fde02cc6822.png">
   > <img alt="Screen Shot 2021-01-07 at 4 10 18 PM" width="1778" src="https://user-images.githubusercontent.com/67837651/103944099-02877a80-50e8-11eb-9b5d-d3e1d35d6b42.png">
   > 
   > Problem 2:
   > Create a new Custom SQL filter like “City” = ‘Las Vegas’
   > Switch to Simple and fill a different filter like Month = 10
   > Switch back to Custom SQL and you will see that the value showing is “City” = ‘Las Vegas’ but if you select the text area the value will change to Month = 10
   > <img alt="Screen Shot 2021-01-07 at 4 21 38 PM" width="1777" src="https://user-images.githubusercontent.com/67837651/103944165-18953b00-50e8-11eb-9845-0be484e9c8da.png">
   > <img alt="Screen Shot 2021-01-07 at 4 22 30 PM" width="1775" src="https://user-images.githubusercontent.com/67837651/103944171-1af79500-50e8-11eb-9381-c276ef864945.png">
   > 
   > Problem 3:
   > Enable filter suggestions in dataset configuration
   > Select a date as a filter
   > All the suggestions are in a format not accepted by the database which will result in an error
   > <img alt="Screen Shot 2021-01-07 at 4 05 37 PM" width="1779" src="https://user-images.githubusercontent.com/67837651/103943917-c3592980-50e7-11eb-85a2-4c0622826269.png">
   > 
   > cc @villebro @kgabryje
   > FYI @eugeniamz
   
   


----------------------------------------------------------------
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.

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] villebro closed issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
villebro closed issue #12293:
URL: https://github.com/apache/superset/issues/12293


   


----------------------------------------------------------------
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.

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] junlincc commented on issue #12293: [explore] When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-756387363


   > There are few other issues(old or regression) around this area that we would like to address together. Tagging this issue `Hold!` and removing original assignee @michael-s-molina, thanks for all the investigation and testing!
   > 
   > Problem 1
   > Select a simple text filter like City
   > Switch to Custom SQL and change the value
   > It will present an error because the generated WHERE clause is invalid
   > To fix the user has to enter the quotes and double quotes manually
   > <img alt="Screen Shot 2021-01-07 at 4 08 31 PM" width="1789" src="https://user-images.githubusercontent.com/67837651/103944048-f4d1f500-50e7-11eb-9920-0c57d5393dcc.png">
   > <img alt="Screen Shot 2021-01-07 at 4 09 17 PM" width="1784" src="https://user-images.githubusercontent.com/67837651/103944080-fbf90300-50e7-11eb-8528-6fde02cc6822.png">
   > <img alt="Screen Shot 2021-01-07 at 4 10 18 PM" width="1778" src="https://user-images.githubusercontent.com/67837651/103944099-02877a80-50e8-11eb-9b5d-d3e1d35d6b42.png">
   > 
   > Problem 2:
   > Create a new Custom SQL filter like “City” = ‘Las Vegas’
   > Switch to Simple and fill a different filter like Month = 10
   > Switch back to Custom SQL and you will see that the value showing is “City” = ‘Las Vegas’ but if you select the text area the value will change to Month = 10
   > <img alt="Screen Shot 2021-01-07 at 4 21 38 PM" width="1777" src="https://user-images.githubusercontent.com/67837651/103944165-18953b00-50e8-11eb-9845-0be484e9c8da.png">
   > <img alt="Screen Shot 2021-01-07 at 4 22 30 PM" width="1775" src="https://user-images.githubusercontent.com/67837651/103944171-1af79500-50e8-11eb-9381-c276ef864945.png">
   > 
   > Problem 3:
   > Enable filter suggestions in dataset configuration
   > Select a date as a filter
   > All the suggestions are in a format not accepted by the database which will result in an error
   > <img alt="Screen Shot 2021-01-07 at 4 05 37 PM" width="1779" src="https://user-images.githubusercontent.com/67837651/103943917-c3592980-50e7-11eb-85a2-4c0622826269.png">
   > 
   > cc @villebro @kgabryje
   > FYI @eugeniamz
   
   


----------------------------------------------------------------
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.

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] zuzana-vej commented on issue #12293: When switching from Simple to Custom SQL for a filter, it translates INT to string

Posted by GitBox <gi...@apache.org>.
zuzana-vej commented on issue #12293:
URL: https://github.com/apache/superset/issues/12293#issuecomment-754968674


   Related bug: https://github.com/apache/superset/issues/11639 


----------------------------------------------------------------
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.

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