dosubot[bot] commented on issue #37246:
URL: https://github.com/apache/superset/issues/37246#issuecomment-3768507857

   <!-- Answer -->
   Superset treats Apache Doris like MySQL for SQL generation, so there are no 
Doris-specific overrides for time filter SQL. This means Superset 6.0.0 
generates non-standard SQL like `'2026-01-12' <= col < '2026-01-19'`, which 
Doris does not support—hence your filter fails, while `BETWEEN` works in 
SQLLab. There’s no config or patch in 6.0.0 to change this behavior 
automatically for Doris — the DorisEngineSpec does not customize time filter 
SQL generation or time grain expressions in Superset 
[[source]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/doris.py).
   
   Workarounds:
   - If you use a virtual dataset, you can write your own SQL with a working 
time filter (e.g., `col BETWEEN ... AND ...` or `col >= ... AND col < ...`).
   - If you use a physical dataset, you can create a view in Doris that applies 
the correct time logic, then point Superset to that view. This is a common 
workaround for Doris SQL syntax limitations in Superset 
[[source]](https://github.com/apache/superset/issues/36770).
   - There’s no Doris-specific setting in Superset 6.0.0 to change how time 
filters are generated.
   
   If you’re not sure whether your dataset is physical or virtual: in Superset, 
a virtual dataset is defined by a SQL query (editable in the dataset editor), 
while a physical dataset points directly to a table or view.
   
   Let me know if you want step-by-step instructions for either workaround.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/79060ff9-dd42-4bdf-a549-2238a2feb444?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Superset%20treats%20Apache%20Doris%20like%20MySQL%20for%20SQL%20generation%2C%20so%20there%20are%20no%20Doris-specific%20overrides%20for%20time%20filter%20SQL.%20This%20means%20Superset%206.0.0%20generates%20non-standard%20SQL%20like%20%60%272026-01-12%27%20%3C%3D%20col%20%3C%20%272026-01-19%27%60%2C%20which%20Doris%20does%20not%20support%E2%80%94hence%20your%20filter%20fails%2C%20while%20%60BETWEEN%60%20works%20in%20SQLLab.%20There%E2%80%99s%20no%20config%20or%20patch%20in%206.0.0%20to%20change%20this%20behavior%20automatically%20for%20Doris%E2%80%AF%E2%80%94%E2%80%AFthe%20DorisEngineSpec%20does%20not%20customize%20time%20filter%20SQL%20generation%20or%20time%20grain%20expressions%20in%20Superset%20%5B%5Bsource%5D%5D%28https%3A//github.com/apache/
 
superset/blob/master/superset/db_engine_specs/doris.py%29.%0A%0AWorkarounds%3A%0A-%20If%20you%20use%20a%20virtual%20dataset%2C%20you%20can%20write%20your%20own%20SQL%20with%20a%20working%20time%20filter%20%28e.g.%2C%20%60col%20BETWEEN%20...%20AND%20...%60%20or%20%60col%20%3E%3D%20...%20AND%20col%20%3C%20...%60%29.%0A-%20If%20you%20use%20a%20physical%20dataset%2C%20you%20can%20create%20a%20view%20in%20Doris%20that%20applies%20the%20correct%20time%20logic%2C%20then%20point%20Superset%20to%20that%20view.%20This%20is%20a%20common%20workaround%20for%20Doris%20SQL%20syntax%20limitations%20in%20Superset%20%5B%5Bsource%5D%5D%28https%3A//github.com/apache/superset/issues/36770%29.%0A-%20There%E2%80%99s%20no%20Doris-specific%20setting%20in%20Superset%206.0.0%20to%20change%20how%20time%20filters%20are%20generated.%0A%0AIf%20you%E2%80%99re%20not%20sure%20whether%20your%20dataset%20is%20physical%20or%20virtual%3A%20in%20Superset%2C%20a%20virtual%20dataset%20is%20defined%20by%20a%20SQL%20query%20
 
%28editable%20in%20the%20dataset%20editor%29%2C%20while%20a%20physical%20dataset%20points%20directly%20to%20a%20table%20or%20view.%0A%0ALet%20me%20know%20if%20you%20want%20step-by-step%20instructions%20for%20either%20workaround.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37246)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to