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 2020/12/14 00:36:08 UTC

[GitHub] [incubator-superset] mistercrunch opened a new issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

mistercrunch opened a new issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028


   "VIEW SAMPLES" shows 0 rows when it should show rows
   
   ### Expected results
   
   it should show some samples from the table
   
   ### Actual results
   
   it shows zero rows
   
   #### Screenshots
   
   <img width="1124" alt="Screen Shot 2020-12-13 at 4 24 42 PM" src="https://user-images.githubusercontent.com/487433/102028816-ccf9a680-3d60-11eb-879d-e6723ac2f7dc.png">
   
   
   #### How to reproduce the bug
   
   1. open the example chart titled "Boys" 
   2. click "VIEW SAMPLES" in the south/data pane
   
   ### Environment
   
   latest `master` 3e22668f8dddf91edf0f9a13a23ecc69fffeb7b6


----------------------------------------------------------------
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] [incubator-superset] junlincc commented on issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028#issuecomment-744149260


   this is duplicate of [#11959](https://github.com/apache/incubator-superset/issues/11959), View Samples only does not show in table viz. @mistercrunch 


----------------------------------------------------------------
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] [incubator-superset] mistercrunch commented on issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028#issuecomment-744100489


   I see this stacktrace, meaning there's probably bad error handling. It should show `Unexpected Error` instead of `No data` here.
   
   ```bash
   DEBUG:superset.models.core:Database.get_sqla_engine(). Masked URL: mysql://root@localhost/examples?charset=utf8
   INFO:superset.connectors.sqla.models:SELECT ds AS ds, gender AS gender, name AS name, num AS num, state AS state, sum_boys AS sum_boys, sum_girls AS sum_girls, CASE WHEN state = 'CA' THEN num ELSE 0 END AS num_california
   FROM birth_names
   WHERE ds >= STR_TO_DATE('1920-12-13 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f') AND ds < STR_TO_DATE('2020-12-13 16:36:40.000000', '%Y-%m-%d %H:%i:%s.%f') AND gender = 'boy' ORDER BY sum(num) DESC
    LIMIT 1000
   WARNING:superset.connectors.sqla.models:Query SELECT ds AS ds,
          gender AS gender,
          name AS name,
          num AS num,
          state AS state,
          sum_boys AS sum_boys,
          sum_girls AS sum_girls,
          CASE
              WHEN state = 'CA' THEN num
              ELSE 0
          END AS num_california
   FROM birth_names
   WHERE ds >= STR_TO_DATE('1920-12-13 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f')
     AND ds < STR_TO_DATE('2020-12-13 16:36:40.000000', '%Y-%m-%d %H:%i:%s.%f')
     AND gender = 'boy'
   ORDER BY sum(num) DESC
   LIMIT 1000 on schema None failed
   Traceback (most recent call last):
     File "/Users/max/code/superset/superset/connectors/sqla/models.py", line 1314, in query
       df = self.database.get_df(sql, self.schema, mutator)
     File "/Users/max/code/superset/superset/models/core.py", line 393, in get_df
       self.db_engine_spec.execute(cursor, sqls[-1])
     File "/Users/max/code/superset/superset/db_engine_specs/base.py", line 891, in execute
       cursor.execute(query)
     File "/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/MySQLdb/cursors.py", line 206, in execute
       res = self._query(query)
     File "/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/MySQLdb/cursors.py", line 312, in _query
       db.query(q)
     File "/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/MySQLdb/connections.py", line 224, in query
       _mysql.connection.query(self, query)
   MySQLdb._exceptions.OperationalError: (3029, 'Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query')
   ```


----------------------------------------------------------------
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] [incubator-superset] junlincc closed issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

Posted by GitBox <gi...@apache.org>.
junlincc closed issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028


   


----------------------------------------------------------------
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] [incubator-superset] issue-label-bot[bot] commented on issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028#issuecomment-744099916


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.99. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
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] [incubator-superset] mistercrunch commented on issue #12028: bug(explore): "VIEW SAMPLES" shows 0 rows when it should show rows

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #12028:
URL: https://github.com/apache/incubator-superset/issues/12028#issuecomment-744101012


   Also, we really should NOT have an `ORDER BY` clause when getting samples. The cost of getting at top `1000` is generally very cheap, even on a super large table, but adding an order by can make things much more expensive as it forces a full can + ordering.


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