dosubot[bot] commented on issue #30977: URL: https://github.com/apache/superset/issues/30977#issuecomment-2486379546
<!-- Greeting --> Hi @cezudas! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's tackle this issue together! <!-- Answer --> The issue you're encountering seems to be related to how the `validate_adhoc_subquery` function interprets SQL queries. This function checks for sub-queries and raises an error if it detects them, unless the feature flag `ALLOW_ADHOC_SUBQUERY` is enabled <sup>[[1]](https://github.com/apache/superset/blob/master/superset/models/helpers.py)</sup>. In your case, it appears that the parser might be misinterpreting the quoted column names containing the word "on" as sub-queries or table references. This could be due to the way the SQL parsing logic handles certain keywords or patterns within column names. To address this issue, you might want to check if the `ALLOW_ADHOC_SUBQUERY` feature flag is enabled in your Superset configuration. If it's not enabled, you can try enabling it to see if it resolves the error. You can do this by setting the feature flag in your configuration file or via an environment variable: ```python FEATURE_FLAGS = { "ALLOW_ADHOC_SUBQUERY": True, } ``` Or set the environment variable: ```bash export SUPERSET_FEATURE_ALLOW_ADHOC_SUBQUERY=True ``` If the issue persists even with the feature flag enabled, it might require further investigation into the SQL parsing logic to ensure that quoted column names are correctly handled without being misinterpreted as sub-queries. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- 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]
