You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "zhaoyongjie (via GitHub)" <gi...@apache.org> on 2023/02/03 07:14:06 UTC

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

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