You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/03/02 21:45:25 UTC
[GitHub] [superset] john-bodley opened a new issue #13423: SORT BY metric incorrectly re-added to SELECT clause
john-bodley opened a new issue #13423:
URL: https://github.com/apache/superset/issues/13423
If the metric name/expression is the same as the SORT BY metric, the SORT BY metric is re-added to the SELECT clause (necessary for sorting) which results in selecting the expression twice which then introduces ambiguity resulting in the query engine returning an error.
### Expected results
The SORT BY metric should not be re-added to the SELECT clause.
### Actual results
Depending on the engine an error may be thrown, i.e., for Presto:
```
line 65:10: Column 'sum(total)' is ambiguous
```
#### Screenshots
If applicable, add screenshots to help explain your problem.
#### How to reproduce the bug
1. Go to explorer.
2. Add a metric to both the `METRICS` section (chart dependent) and `SORT BY`.
3. Click `RUN`.
4. Possibly see the error and notice that the metric is duplicated in the SQL, i.e.,
```
SELECT
...
sum("total") AS "SUM(total)",
sum("total") AS "SUM(total)"
```
### Environment
(please complete the following information):
- superset version: `master`
- python version: `3.7`
- node.js version: `node -v`
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] 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.
- [ ] 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.
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] ktmud edited a comment on issue #13423: [Explore]SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-791172887
This is acutally related to #13057. Previously Area chart doesn't even have a sort by field.
I just fixed it in https://github.com/apache/superset/pull/13473
----------------------------------------------------------------
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.
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] junlincc commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789278226
thanks for reporting!
I'm not able to reproduce from local.@zuzana-vej Is it happening in a specific chart and db?
----------------------------------------------------------------
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.
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] john-bodley commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
john-bodley commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789282629
@junlincc we were seeing in on the area chart with a `GROUP BY` using the Presto engine. Note the issue could be engine specific (some may not barf) and thus in order see the issue you'll have to check the generated SQL. Here's a screenshot.
<img width="429" alt="Screen Shot 2021-03-03 at 11 52 52 AM" src="https://user-images.githubusercontent.com/4567245/109726125-04b51380-7c17-11eb-9db8-96a20bdf51c5.png">
----------------------------------------------------------------
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.
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] john-bodley edited a comment on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
john-bodley edited a comment on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789282629
----------------------------------------------------------------
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.
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] junlincc commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789393692
ah, I see. It does happen when group by is added to area chart and bar and.
Doesn't happen to line chart, time-series line.
Will give a fix soon.
cc @maloun96 Victor, could you please take a look, it might related to the _sort-by_ project we recently did? thanks!
<img width="1717" alt="Screen Shot 2021-03-02 at 7 03 06 PM" src="https://user-images.githubusercontent.com/67837651/109746242-f371f580-7b89-11eb-988c-207e1937aae0.png">
<img width="1722" alt="Screen Shot 2021-03-02 at 7 06 57 PM" src="https://user-images.githubusercontent.com/67837651/109746727-b4906f80-7b8a-11eb-92e4-ba40b5f4898d.png">
----------------------------------------------------------------
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.
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] junlincc edited a comment on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789393692
ah, I see. It does happen when group by is added to area chart and bar and Pivottable. @john-bodley thanks for additional info!
Doesn't happen to line chart, time-series line.
Will give a fix soon.
cc @maloun96 Victor, could you please take a look, it might related to the _sort-by_ project we recently did? thanks!
<img width="1717" alt="Screen Shot 2021-03-02 at 7 03 06 PM" src="https://user-images.githubusercontent.com/67837651/109746242-f371f580-7b89-11eb-988c-207e1937aae0.png">
<img width="1722" alt="Screen Shot 2021-03-02 at 7 06 57 PM" src="https://user-images.githubusercontent.com/67837651/109746727-b4906f80-7b8a-11eb-92e4-ba40b5f4898d.png">
<img width="1713" alt="Screen Shot 2021-03-02 at 7 29 29 PM" src="https://user-images.githubusercontent.com/67837651/109748433-b90a5780-7b8d-11eb-8c2c-35e04bae2496.png">
----------------------------------------------------------------
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.
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] ktmud closed issue #13423: [Explore]SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
ktmud closed issue #13423:
URL: https://github.com/apache/superset/issues/13423
----------------------------------------------------------------
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.
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] junlincc edited a comment on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789393692
ah, I see. It does happen when group by is added to area chart and bar and. @john-bodley thanks for additional info!
Doesn't happen to line chart, time-series line.
Will give a fix soon.
cc @maloun96 Victor, could you please take a look, it might related to the _sort-by_ project we recently did? thanks!
<img width="1717" alt="Screen Shot 2021-03-02 at 7 03 06 PM" src="https://user-images.githubusercontent.com/67837651/109746242-f371f580-7b89-11eb-988c-207e1937aae0.png">
<img width="1722" alt="Screen Shot 2021-03-02 at 7 06 57 PM" src="https://user-images.githubusercontent.com/67837651/109746727-b4906f80-7b8a-11eb-92e4-ba40b5f4898d.png">
----------------------------------------------------------------
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.
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] ktmud commented on issue #13423: [Explore]SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
ktmud commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-791172887
This is indeed related to https://github.com/apache/superset/pull/13057
Previously Area chart doesn't even have a sort by field.
I'm fixing them all in #13434
----------------------------------------------------------------
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.
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] junlincc edited a comment on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789393692
ah, I see. It does happen when group by is added to area chart and bar and Pivottable. @john-bodley thanks for additional info!
Doesn't happen to line chart, time-series line.
Will give a fix soon.
cc @maloun96 Victor, could you please take a look, it might related to the _sort-by_ project we recently did? thanks!
<img width="1717" alt="Screen Shot 2021-03-02 at 7 03 06 PM" src="https://user-images.githubusercontent.com/67837651/109746242-f371f580-7b89-11eb-988c-207e1937aae0.png">
<img width="1722" alt="Screen Shot 2021-03-02 at 7 06 57 PM" src="https://user-images.githubusercontent.com/67837651/109746727-b4906f80-7b8a-11eb-92e4-ba40b5f4898d.png">
----------------------------------------------------------------
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.
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] john-bodley commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
john-bodley commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789396171
Note this may be related to https://github.com/apache/superset/issues/13426 which also seems to be a regression.
----------------------------------------------------------------
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.
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] ktmud commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
ktmud commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789400979
#13228 seems to have the same root cause.
----------------------------------------------------------------
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.
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] zuzana-vej commented on issue #13423: SORT BY metric incorrectly re-added to SELECT clause
Posted by GitBox <gi...@apache.org>.
zuzana-vej commented on issue #13423:
URL: https://github.com/apache/superset/issues/13423#issuecomment-789244698
fyi @junlincc
----------------------------------------------------------------
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.
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