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

   <!-- Answer -->
   The front-end request parameter you provided includes a `queries` array, 
which is structured as expected for Superset's API. Each query object contains 
fields like `filters`, `columns`, `metrics`, `orderby`, and others. The 
`orderby` clause is specified as `[["user_cnt", false]]`, indicating that the 
results should be ordered by the `user_cnt` column in ascending order (since 
`false` typically denotes ascending order) 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/query/types/QueryResponse.ts)</sup>.
   
   Given the `KeyError: 'compile_state'` issue, it's important to ensure that 
the `orderby` clause and other query parameters are correctly processed by 
Superset and SQLAlchemy. Here are a few things to consider:
   
   1. **Orderby Clause**: Ensure that the `user_cnt` column is correctly 
defined and available in the dataset. If `user_cnt` is a metric or derived 
column, verify that it is properly calculated and included in the query context.
   
   2. **Metrics and Columns**: Double-check that all metrics and columns used 
in the query are correctly defined and accessible. Any missing or incorrectly 
defined fields could lead to issues during query compilation.
   
   3. **SQLAlchemy Compatibility**: Since you're using SQLAlchemy 1.4.32, 
ensure that there are no known compatibility issues with Superset 4.1.1 that 
might affect query compilation, especially with virtual tables.
   
   If the issue persists, consider reviewing the SQLAlchemy and Superset logs 
for more detailed error messages that might provide additional insights into 
the root cause of the `compile_state` error.
   
   
   <!-- 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/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/2a97ae68-ffdf-4fa1-a7d1-3e0fb9954160?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