You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fmannhardt (via GitHub)" <gi...@apache.org> on 2023/08/24 12:36:33 UTC
[GitHub] [superset] fmannhardt opened a new issue, #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
fmannhardt opened a new issue, #25072:
URL: https://github.com/apache/superset/issues/25072
When using the table chart and adding a derived column by using "Custom SQL" and using certain syntax that uses keywords that may be mistaken for a subquery I am unable to use the custom SQL.
#### How to reproduce the bug
0. Add any PostgreSQL datasource with a INTERVAL column (duration)
1. Add a table chart
2. Add a column with Customer SQL option and the following query:
`extract(epoch FROM duration) * 1000`
3. See error:

### Expected results
The column should have been calculated since there is no subquery involved.
### Actual results
See step 3.
### Environment
(please complete the following information):
- browser type and version: Firefox 116.0.3
- superset version: 2.1.0
- python version: 3.8.16
- any feature flags active:
```
FEATURE_FLAGS = {
"EMBEDDED_SUPERSET": True,
"DASHBOARD_NATIVE_FILTERS": True,
"DYNAMIC_PLUGINS": True,
"DASHBOARD_CROSS_FILTERS": True,
"THUMBNAILS": False,
"DRILL_TO_DETAIL": False,
"VERSIONED_EXPORT": True,
"ENABLE_TEMPLATE_PROCESSING": True,
"DASHBOARD_RBAC": True,
"GENERIC_CHART_AXES": True
}
```
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
(according to the 2.1.1 changelog this has not been fixed)
- [ x] I have checked the issue tracker for the same issue and I haven't found one similar.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns [superset]
Posted by "korosh526 (via GitHub)" <gi...@apache.org>.
korosh526 commented on issue #25072:
URL: https://github.com/apache/superset/issues/25072#issuecomment-2838772846
I've encountered this problem too.
It seems that Superset assume some of the column names that enclosed in quotes as subqueries. after changing the syntax in R string ('"col name"') the problem was resolved.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on issue #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #25072:
URL: https://github.com/apache/superset/issues/25072#issuecomment-1702831840
Closing this issue as the feature flag seems to resolve it. @fmannhardt feel free to reopen the issue if that's not the case. I authored https://github.com/apache/superset/pull/25161 to include a note in `UPDATING.md` about the feature flag.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on issue #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #25072:
URL: https://github.com/apache/superset/issues/25072#issuecomment-1691836969
Does the `ALLOW_ADHOC_SUBQUERY` feature flag resolves your issue?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] iercan commented on issue #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
Posted by "iercan (via GitHub)" <gi...@apache.org>.
iercan commented on issue #25072:
URL: https://github.com/apache/superset/issues/25072#issuecomment-1702825605
> Does the `ALLOW_ADHOC_SUBQUERY` feature flag resolves your issue?
This is solved issue for me. I was getting this error for druid connection.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina closed issue #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #25072: "Custom SQL fields cannot contain sub-queries" when using certain SQL keywords in columns
URL: https://github.com/apache/superset/issues/25072
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org