You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/09/14 14:29:22 UTC

[GitHub] maartenvanwauwe opened a new issue #3463: series limit put to 0 results in no subquery but gives stupid parsing error (on postgre ?)

maartenvanwauwe opened a new issue #3463: series limit put to 0 results in no subquery but gives stupid parsing error (on postgre ?)
URL: https://github.com/apache/incubator-superset/issues/3463
 
 
   
   if I set the series limit to 100 -> query works
   SELECT tenant AS tenant,
          ymd_ts AS __timestamp,
          SUM(myschema.marathonreservation.weightedtotal) AS sum__weightedtotal
   FROM myschema.marathonreservation
   JOIN
     (SELECT tenant AS tenant__,
             SUM(myschema.marathonreservation.weightedtotal) AS mme_inner__
      FROM myschema.marathonreservation
      WHERE ymd_ts >= '1917-09-14 00:00:00'
        AND ymd_ts <= '2017-09-14 14:21:08'
      GROUP BY tenant
      ORDER BY mme_inner__ DESC
      LIMIT 100) AS anon_1 ON tenant = tenant__
   WHERE ymd_ts >= '1917-09-14 00:00:00'
     AND ymd_ts <= '2017-09-14 14:21:08'
   GROUP BY tenant,
            ymd_ts
   ORDER BY sum__weightedtotal DESC
   LIMIT 5000
   
   
   if I remove the series limit (by putting on 0) -> '>' not supported between instances of 'str' and 'int'
   SELECT tenant AS tenant,
          ymd_ts AS __timestamp,
          SUM(myschema.marathonreservation.weightedtotal) AS sum__weightedtotal
   FROM myschema.marathonreservation
   WHERE ymd_ts >= '1917-09-14 00:00:00'
     AND ymd_ts <= '2017-09-14 14:21:35'
   GROUP BY tenant,
            ymd_ts
   ORDER BY sum__weightedtotal DESC
   LIMIT 5000
   
   
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 251, in get_payload
       data = self.get_data(df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 916, in get_data
       df = self.process_data(df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 865, in process_data
       values=fd.get('metrics'))
     File "/usr/local/lib/python3.6/site-packages/pandas/core/reshape/pivot.py", line 160, in pivot_table
       table = table.sort_index(axis=1)
     File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 3243, in sort_index
       labels = labels._sort_levels_monotonic()
     File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/multi.py", line 1240, in _sort_levels_monotonic
       indexer = lev.argsort()
     File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2091, in argsort
       return result.argsort(*args, **kwargs)
   TypeError: '>' not supported between instances of 'str' and 'int'
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services