<p dir="auto">version:0.19.1<br>
if I set the series limit to 100 -&gt; query works<br>
SELECT tenant AS tenant,<br>
ymd_ts AS <strong>timestamp,<br>
SUM(myschema.marathonreservation.weightedtotal) AS sum__weightedtotal<br>
FROM myschema.marathonreservation<br>
JOIN<br>
(SELECT tenant AS tenant</strong>,<br>
SUM(myschema.marathonreservation.weightedtotal) AS mme_inner__<br>
FROM myschema.marathonreservation<br>
WHERE ymd_ts &gt;= '1917-09-14 00:00:00'<br>
AND ymd_ts &lt;= '2017-09-14 14:21:08'<br>
GROUP BY tenant<br>
ORDER BY mme_inner__ DESC<br>
LIMIT 100) AS anon_1 ON tenant = tenant__<br>
WHERE ymd_ts &gt;= '1917-09-14 00:00:00'<br>
AND ymd_ts &lt;= '2017-09-14 14:21:08'<br>
GROUP BY tenant,<br>
ymd_ts<br>
ORDER BY sum__weightedtotal DESC<br>
LIMIT 5000</p>
<p dir="auto">if I remove the series limit (by putting on 0) -&gt; '&gt;' not supported between instances of 'str' and 'int'<br>
SELECT tenant AS tenant,<br>
ymd_ts AS __timestamp,<br>
SUM(myschema.marathonreservation.weightedtotal) AS sum__weightedtotal<br>
FROM myschema.marathonreservation<br>
WHERE ymd_ts &gt;= '1917-09-14 00:00:00'<br>
AND ymd_ts &lt;= '2017-09-14 14:21:35'<br>
GROUP BY tenant,<br>
ymd_ts<br>
ORDER BY sum__weightedtotal DESC<br>
LIMIT 5000</p>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 251, in get_payload<br>
data = self.get_data(df)<br>
File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 916, in get_data<br>
df = self.process_data(df)<br>
File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 865, in process_data<br>
values=fd.get('metrics'))<br>
File "/usr/local/lib/python3.6/site-packages/pandas/core/reshape/pivot.py", line 160, in pivot_table<br>
table = table.sort_index(axis=1)<br>
File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 3243, in sort_index<br>
labels = labels._sort_levels_monotonic()<br>
File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/multi.py", line 1240, in _sort_levels_monotonic<br>
indexer = lev.argsort()<br>
File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2091, in argsort<br>
return result.argsort(*args, **kwargs)<br>
TypeError: '&gt;' not supported between instances of 'str' and 'int'</p>
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if any</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar</li>
</ul>
<h3 dir="auto">Superset version</h3>
<p dir="auto">0.18.5</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">the slice loads fine, as it did in caravel 0.14.X</p>
<h3 dir="auto">Actual results</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2017-06-23 15:36:22,271:ERROR:root:unorderable types: str() &gt; int()
Traceback (most recent call last):
  File &quot;/venv/lib/python3.4/site-packages/superset/viz.py&quot;, line 240, in get_payload
    data = self.get_data(df)
  File &quot;/venv/lib/python3.4/site-packages/superset/viz.py&quot;, line 1095, in get_data
    values=self.metrics)
  File &quot;/venv/lib/python3.4/site-packages/pandas/core/reshape/pivot.py&quot;, line 160, in pivot_table
    table = table.sort_index(axis=1)
  File &quot;/venv/lib/python3.4/site-packages/pandas/core/frame.py&quot;, line 3243, in sort_index
    labels = labels._sort_levels_monotonic()
  File &quot;/venv/lib/python3.4/site-packages/pandas/core/indexes/multi.py&quot;, line 1240, in _sort_levels_monotonic
    indexer = lev.argsort()
  File &quot;/venv/lib/python3.4/site-packages/pandas/core/indexes/base.py&quot;, line 2091, in argsort
    return result.argsort(*args, **kwargs)
TypeError: unorderable types: str() &gt; int()"><pre class="notranslate"><code class="notranslate">2017-06-23 15:36:22,271:ERROR:root:unorderable types: str() &gt; int()
Traceback (most recent call last):
  File "/venv/lib/python3.4/site-packages/superset/viz.py", line 240, in get_payload
    data = self.get_data(df)
  File "/venv/lib/python3.4/site-packages/superset/viz.py", line 1095, in get_data
    values=self.metrics)
  File "/venv/lib/python3.4/site-packages/pandas/core/reshape/pivot.py", line 160, in pivot_table
    table = table.sort_index(axis=1)
  File "/venv/lib/python3.4/site-packages/pandas/core/frame.py", line 3243, in sort_index
    labels = labels._sort_levels_monotonic()
  File "/venv/lib/python3.4/site-packages/pandas/core/indexes/multi.py", line 1240, in _sort_levels_monotonic
    indexer = lev.argsort()
  File "/venv/lib/python3.4/site-packages/pandas/core/indexes/base.py", line 2091, in argsort
    return result.argsort(*args, **kwargs)
TypeError: unorderable types: str() &gt; int()
</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<ul dir="auto">
<li>open the slice</li>
</ul>
<p dir="auto">It happens on a specific slice that i cannot share unfortunately. Note to self: this is "distribuzione uso complessivo per scuola"</p>