Bug description
I have an github project with superset + pinot, where I configure the dashboard USA Births Names to use with Pinot: https://github.com/jacob-roldan/issues-superset6-pinot
One error is in the chart "Girl Name Cloud PINOT" This is the query:
SELECT "name", SUM(num)
FROM birth_names
WHERE ds1 >= '1925-09-24 00:00:00.000000' AND ds1 < '2025-09-24 17:30:50.000000' AND gender = 'girl' GROUP BY "name"
LIMIT 50000;
Where the field name is escaped, but the result is wrong:
That query executed with dBeaver is OK:
The step to reproduce it using that git-repo:
//Start containers
docker-compose up -d
//Install driver for Pinot
./superset-config-pinot.sh
//Load data and import dashboard
./example_birthnames.sh
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
With version 5.0.0, there is a problem with Pinot driver. It's not possible to configure a connection to Pinot. With version 4.1.4 all charts of USA Births Names dashboard are OK except one
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
This issue is likely related to how Superset handles SQL dialects and identifier escaping for Pinot. There have been known problems where Superset generated queries using MySQL-style syntax (like backticks or incorrect quoting), which Pinot does not support. This caused charts to fail or return incorrect results, especially when using reserved words or quoted identifiers like "name"
.
A fix for the SQL dialect issue was merged into the master branch, but if you're still seeing problems, it may be due to how identifier quoting is handled in the Pinot engine spec or the underlying SQLAlchemy dialect. Superset's Pinot integration does not explicitly strip or modify quotes from field names, so issues can arise if the dialect logic is too generic or not fully aligned with Pinot's requirements. There was also a recent fix for a related bug where string escaping logic was incorrectly shared between dialects, which could have affected Pinot as well see details.
If you haven't already, try the workaround of removing the 'pinot'
entry from the SQL parser configuration (superset/sql/parse.py
) as described in recent issues here. This forces Superset to avoid using MySQL-style syntax for Pinot queries.
If the problem persists, it may help to test with other quoted columns to see if the issue is specific to "name"
or affects all quoted identifiers. Also, check if your Superset instance includes the latest fixes from the master branch, as these address several dialect and escaping bugs for Pinot reference.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: jacob-roldan
Commenting the entry in superset/sql/parse.py
for pinot as @dosubot suggested is working.
Comment From: dosubot[bot]
Great to hear the dialect workaround fixed the original query issue. The new "undefined column 'Girls'" error in the "Genders by State PINOT" widget is happening because Pinot (and Superset's Pinot integration) does not support column aliasing in SELECT or ORDER BY clauses—only real column names from the table schema are allowed in queries for Pinot datasources see code reference.
To resolve this, check the chart or dataset configuration for any references to aliases like "Girls" and update them to use actual column names from your Pinot table. This is a current limitation of Pinot support in Superset, and avoiding aliases in your queries or chart definitions is necessary for now. Keep an eye on future Superset releases for improved Pinot compatibility.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: rusackas
CC @betodealmeida