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 2022/10/10 11:26:27 UTC

[GitHub] [superset] HeathLee opened a new issue, #21755: x-aixs alias name same as original field name

HeathLee opened a new issue, #21755:
URL: https://github.com/apache/superset/issues/21755

   When using [Apache Doris](https://doris.apache.org/) (compatible with MySQL protocol) as database and enabled GENERIC_CHART_AXES feature, the sql generated by superset can not be executed correctly.
   
   #### How to reproduce the bug
   1. Enable `GENERIC_CHART_AXES` feature
   2. Explore doris dataset as below
   ![image](https://user-images.githubusercontent.com/7382922/194853777-a6b1b9e0-3d97-42ea-901e-8d78ff705576.png)
   
   ### Expected results
   
   generated sql should have different alias name in `select` clause like
   ```sql
   SELECT DATE(c_at) AS c_at_aliased,
          COUNT(*) AS count
   FROM doris_db.table_xxx
   GROUP BY DATE(c_at)
   ORDER BY count DESC
   LIMIT 10000;
   ```
   or user can custome alias x-aixs name
   
   ### Environment
   
   - superset version: `master at d1a6f0ebc4e2dd092580ad49da7c724c577e6ece`
   - any feature flags active:
   `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.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [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


[GitHub] [superset] lilykuang commented on issue #21755: x-aixs alias name same as original field name

Posted by "lilykuang (via GitHub)" <gi...@apache.org>.
lilykuang commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1419652918

   I was able to reproduce the same issue with GENERIC_CHART_AXES set to True or False. It maybe related to sql parsing. assigned to @betodealmeida to take a close look and removed the label for [flag:GENERIC_CHART_AXES](https://github.com/apache/superset/labels/flag%3AGENERIC_CHART_AXES)


-- 
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 #21755: x-aixs alias name same as original field name

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1423219151

   Closing this given that @betodealmeida's fix was merged. Please feel free to reopen the issue if needed.


-- 
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] sowo commented on issue #21755: x-aixs alias name same as original field name

Posted by "sowo (via GitHub)" <gi...@apache.org>.
sowo commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1412441498

   Sorry, can't screen record. So here's what you get when using a dataset derived from Elasticsearch:
   ![image](https://user-images.githubusercontent.com/2765941/216116694-08c67a4b-a431-4789-9706-9af09d536191.png)
   
   And here's the underlying query that produces the issue:
   
   ```
   SELECT HISTOGRAM("DATE", INTERVAL 1 DAY) AS "DATE",
          count(*) AS count
   FROM
     (select "DATE",
             "ITEM"
      from "table") AS virtual_table
   GROUP BY "DATE"
   ORDER BY count DESC
   LIMIT 10000;
   ```
   
   I think that Elastic gets confused by the column name "DATE" being used in the inner and outer queries.


-- 
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] emirkmo commented on issue #21755: x-aixs alias name same as original field name

Posted by "emirkmo (via GitHub)" <gi...@apache.org>.
emirkmo commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1405024240

   This is not database specific. 
   
   It is happening when GENERIC_CHART_AXES is enabled and V2 of the chart is being used. It can be fixed by running a query on the X-axis (or by using the old non V2 version of the chart).
   
   ```Python
   Error: Orig exception: Code: 215. DB::Exception: Column `<columnname>` is not under aggregate function and not in GROUP BY: While processing <columnname> AS <column name>`.
   ```


-- 
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] lilykuang commented on issue #21755: x-aixs alias name same as original field name

Posted by "lilykuang (via GitHub)" <gi...@apache.org>.
lilykuang commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1414509758

   I am not sure how to reproduce the issue. I am using open distro elasticsearch database with GENERIC_CHART_AXES. @sowo not sure which step i missed
   ![odelasticsearch](https://user-images.githubusercontent.com/5705598/216473332-0b52f947-7797-4900-a169-d8adfceae3e5.gif)
   


-- 
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] zhaoyongjie commented on issue #21755: x-aixs alias name same as original field name

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1415195528

   > Sorry, can't screen record. So here's what you get when using a dataset derived from Elasticsearch: ![image](https://user-images.githubusercontent.com/2765941/216116694-08c67a4b-a431-4789-9706-9af09d536191.png)
   > 
   > And here's the underlying query that produces the issue:
   > 
   > ```
   > SELECT HISTOGRAM("DATE", INTERVAL 1 DAY) AS "DATE",
   >        count(*) AS count
   > FROM
   >   (select "DATE",
   >           "ITEM"
   >    from "table") AS virtual_table
   > GROUP BY "DATE"
   > ORDER BY count DESC
   > LIMIT 10000;
   > ```
   > 
   > I think that Elastic gets confused by the column name "DATE" being used in the inner and outer queries.
   
   I guess that Elasticsearch confused keywords "DATE" so you can do a little change in the subquery that makes a alias for the "DATE" column, for instance:
   
   ```
   select "DATE" as "data_column",
             "ITEM"
      from "table"
   ```
   


-- 
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 #21755: x-aixs alias name same as original field name

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #21755: x-aixs alias name same as original field name
URL: https://github.com/apache/superset/issues/21755


-- 
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] HeathLee commented on issue #21755: x-aixs alias name same as original field name

Posted by GitBox <gi...@apache.org>.
HeathLee commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1309690641

   Any update for this?


-- 
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] sowo commented on issue #21755: x-aixs alias name same as original field name

Posted by "sowo (via GitHub)" <gi...@apache.org>.
sowo commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1415383143

   > I am not sure how to reproduce the issue. I am using open distro elasticsearch database with GENERIC_CHART_AXES. @sowo not sure which step i missed ![odelasticsearch](https://user-images.githubusercontent.com/5705598/216473332-0b52f947-7797-4900-a169-d8adfceae3e5.gif) [ ![odelasticsearch](https://user-images.githubusercontent.com/5705598/216473332-0b52f947-7797-4900-a169-d8adfceae3e5.gif) ](https://user-images.githubusercontent.com/5705598/216473332-0b52f947-7797-4900-a169-d8adfceae3e5.gif) [ ](https://user-images.githubusercontent.com/5705598/216473332-0b52f947-7797-4900-a169-d8adfceae3e5.gif)
   
   I think you need a virtual data set to reproduce the 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] betodealmeida commented on issue #21755: x-aixs alias name same as original field name

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1419769365

   Fix here: https://github.com/preset-io/elasticsearch-dbapi/pull/99


-- 
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] betodealmeida commented on issue #21755: x-aixs alias name same as original field name

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1419693312

   Let me push a fix to the ES driver.


-- 
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] lilykuang commented on issue #21755: x-aixs alias name same as original field name

Posted by "lilykuang (via GitHub)" <gi...@apache.org>.
lilykuang commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1411122243

   I tested with examples database with GENERIC_CHART_AXES and bar chart. I wasn't able to reproduce the issue. Did i miss any step?
   
   ![query_GENERIC_CHART_AXES](https://user-images.githubusercontent.com/5705598/215892414-03e919da-4452-46c5-bf0e-75ad8d6e8fb0.gif)
   


-- 
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 #21755: x-aixs alias name same as original field name

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1411118300

   @lilykuang I added you as one of the owners here 😉 


-- 
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] zhaoyongjie commented on issue #21755: x-aixs alias name same as original field name

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1274658969

   @HeathLee Thanks for the report, I will follow this 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] sowo commented on issue #21755: x-aixs alias name same as original field name

Posted by GitBox <gi...@apache.org>.
sowo commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1363766978

   Elasticsearch is also affected by this 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] betodealmeida commented on issue #21755: x-aixs alias name same as original field name

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1419691967

   The problem here is that this is invalid:
   
   ```sql
   select "DATE" as "data_column",
             "ITEM"
      from "table"
   ```
   
   It should be:
   
   ```sql
   select "DATE" as `data_column`,
             "ITEM"
      from "table"
   ```


-- 
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] rusackas commented on issue #21755: x-aixs alias name same as original field name

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #21755:
URL: https://github.com/apache/superset/issues/21755#issuecomment-1405657745

   Pinging @yousoph and @michael-s-molina since I _think_ you're now the right people to track GENERIC_CHART_AXES bugs... but let me know if I'm mistaken!


-- 
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