Skip to content

Commit

Permalink
[hotfix] 'No numeric types to aggregate'
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 17, 2017
1 parent 2395fbb commit fe3f5f6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,7 @@ def get_quoter(self):
def get_df(self, sql, schema):
sql = sql.strip().strip(';')
eng = self.get_sqla_engine(schema=schema)

conn = eng.raw_connection()
cur = conn.cursor()
cur.execute(sql, **self.db_engine_spec.cursor_execute_kwargs)

cols = [col[0] for col in cur.description]
df = pd.DataFrame(list(cur.fetchall()), columns=cols)
df = pd.read_sql(sql, eng)

def needs_conversion(df_series):
if df_series.empty:
Expand Down

0 comments on commit fe3f5f6

Please sign in to comment.