scriminaci opened a new issue #12892:
URL: https://github.com/apache/superset/issues/12892
With the current master, filter boxes create an empty select if no ordering
criteria are selected.
### Expected results
The distinct values of the configured filter. If I configure the filter
with sorting criteria the right SQL query is generated:
`SELECT `EventType` AS `EventType`,
COUNT(*) AS `count`
FROM `***.***`
WHERE ReferenceHour >= CAST('2020-11-02T00:00:00.000000' AS DATETIME)
AND ReferenceHour CAST('2021-02-02T00:00:00.000000' AS DATETIME)
GROUP BY `EventType`
LIMIT 50000`
### Actual results
**Error message**
> 400 Syntax error: SELECT list must not be empty at [2:1] (job ID:
3d46b551-77bd-4276-b6ac-5d9e3b45858b) -----Query Job SQL Follows----- | . | . |
. | . | . | . | . | . | 1:SELECT 2:FROM `***.***` 3:WHERE ReferenceHour >=
CAST('2020-11-02T00:00:00.000000' AS DATETIME) 4: AND ReferenceHour <
CAST('2021-02-02T00:00:00.000000' AS DATETIME) 5:LIMIT 50000 | . | . | . | . |
. | . | . | . |
>
> This may be triggered by:
> Issue 1002 - The database returned an unexpected error.
>
>
> Please reach out to the Chart Owner for assistance.
**Generated query**
`SELECT
FROM `***.***`
WHERE ReferenceHour >= CAST('2020-11-02T00:00:00.000000' AS DATETIME)
AND ReferenceHour < CAST('2021-02-02T00:00:00.000000' AS DATETIME)
LIMIT 50000`
#### Screenshots

#### How to reproduce the bug
1. Create a new filter on a not temporal value
2. Do not add sorting criteria on the filter configuration
3. Run the query
4. See the error
### Environment
- superset version: `master`
- python version: `Python 3.7.9`
- node.js version: `N/A`
- database: BigQuery
### 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
I am using the master version because I would l was testing #12836
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]