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

   <!-- Greeting -->
   Hey, @UnamedRus! I'm here to help you with any bugs, questions, or 
contributions you have in mind. Let's squash those bugs together!
   
   <!-- Answer -->
   The issue you're encountering seems to be related to the SQL parser in 
Superset not handling the specific syntax used in your ClickHouse query. The 
error message indicates a syntax error near 'SELECT', which suggests that the 
parser is having trouble with the `WITH` clause and the use of the 
`approx_top_k` function.
   
   Here are a few things to consider:
   
   1. **Syntax Check**: Ensure that the syntax of your query is correct 
according to ClickHouse's SQL dialect. The use of `approx_top_k` might require 
specific syntax that the parser isn't recognizing.
   
   2. **Parser Limitations**: Superset's SQL parser might have limitations when 
dealing with certain ClickHouse-specific functions or syntax. This can lead to 
parsing errors, especially with complex expressions or functions like 
`approx_top_k`.
   
   3. **Workaround**: As a workaround, you might try simplifying the query or 
breaking it into parts that can be executed separately. This could help 
identify which part of the query is causing the issue.
   
   4. **DML/DDL Settings**: The error message also mentions that the database 
does not allow DDL/DML operations, which might be affecting the execution of 
your query. Ensure that your connection settings are configured to allow the 
necessary operations if applicable.
   
   Unfortunately, without specific details on how Superset's parser handles 
ClickHouse functions like `approx_top_k`, it might be challenging to provide a 
precise solution. You may need to experiment with different query structures or 
consult ClickHouse documentation for alternative approaches to achieve the 
desired result.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/41486d6a-c644-4434-83a4-e85c9e04d898?feedback_type=other)</sup>
   


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