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

   <!-- Answer -->
   This error is coming from the SQL parsing layer (specifically, sqlglot) used 
by the ClickHouse driver, not from Superset itself. Superset passes your SQL 
directly to the database driver, which then tries to parse it. The ON CLUSTER 
clause in your SQL is not currently supported by sqlglot, so it raises an error 
when it encounters it. Any fix for this would need to happen in sqlglot or the 
ClickHouse driver, not in Superset itself. There is no built-in workaround in 
Superset to rewrite or pre-process ClickHouse SQL to handle ON CLUSTER 
statementsĀ 
[reference](https://github.com/apache/superset/blob/a1cbd2578e24ed6c72024e1d1cf195846ace05d7/superset/db_engine_specs/clickhouse.py).
   
   If you can, try running your CREATE TABLE statement without the ON CLUSTER 
clause, or execute this kind of DDL directly in ClickHouse rather than through 
Superset. If you need ON CLUSTER support via Superset, you would need to wait 
for upstream support in sqlglot or the ClickHouse driver, or implement a custom 
query mutator/validator hook in your deployment to handle this clause before 
parsing.
   
   Let me know if you want more details on possible workarounds or tracking 
upstream support.
   
   
   <!-- 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/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/db0bad5d-1d41-46ce-910d-58f1cc47fd25?feedback_type=other)</sup>&nbsp;&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/33813)


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