Problem
A count query on a MySQL external table pushes down a query with an empty select list. MySQL rejects the statement:
ERROR 42000 (1064): You have an error in your SQL syntax; check the manual ... near 'FROM companies WHERE (companies.revenue > 40.0)) AS ...
The plan projects no column. The generated SQL puts FROM directly after SELECT.
Steps
- Create an external table with
STORED AS MYSQL.
- Run
SELECT count(*) FROM <table> WHERE revenue > 40.
- The server answers 400.
The failure repeats when the file runs alone.
Failed test
test_mysql.py::test_mysql_filter_result
Task
- Emit
SELECT 1 when the pushed down plan projects no column.
- Add a test for a count query with a filter.
Environment
Branch features/reimplement-atlas. Image beacon-integration:local.
Problem
A count query on a MySQL external table pushes down a query with an empty select list. MySQL rejects the statement:
The plan projects no column. The generated SQL puts
FROMdirectly afterSELECT.Steps
STORED AS MYSQL.SELECT count(*) FROM <table> WHERE revenue > 40.The failure repeats when the file runs alone.
Failed test
test_mysql.py::test_mysql_filter_resultTask
SELECT 1when the pushed down plan projects no column.Environment
Branch
features/reimplement-atlas. Imagebeacon-integration:local.