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

   <!-- Answer -->
   The issue you're encountering seems to be related to how Superset's SQL Lab 
handles column name casing when Row Level Security (RLS) is applied. In 
PostgreSQL, unquoted identifiers are automatically converted to lowercase, 
which can lead to issues if your column names contain uppercase letters and are 
not properly quoted in the SQL query.
   
   In your case, it appears that even though you are using double quotes for 
column names in the RLS configuration, the SQL Lab query sent to the database 
does not include these quotes, resulting in a casing mismatch and the error 
you're seeing.
   
   This behavior is consistent with the known handling of SQL query generation 
in Superset, where column names might not be quoted correctly, especially when 
RLS is involved. The `RLS_IN_SQLLAB` flag attempts to apply RLS rules to SQL 
Lab queries, but this can lead to issues if the query parsing and manipulation 
do not preserve the necessary quoting for column names 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/config.py)</sup>.
   
   To address this issue, you might consider:
   
   1. Ensuring that all column names in your queries are explicitly quoted to 
preserve their casing.
   2. Reviewing the RLS configuration to ensure that it aligns with how SQL Lab 
processes queries.
   3. Checking if there are any updates or patches in newer versions of 
Superset that address this specific issue.
   
   If the problem persists, you may need to explore alternative ways to handle 
RLS or adjust your dataset schema to avoid casing issues.
   
   
   <!-- 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/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f2443e09-3ef6-4dc8-b718-f7c4d61c5547?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