From 5d0a01d0d099a9d73ba04fded7cad223a10e86f2 Mon Sep 17 00:00:00 2001 From: Boris Hajduk Date: Tue, 9 May 2017 13:19:52 +0800 Subject: [PATCH] Decimal is a valid numeric type (#2720) * Decimal is a valid numeric type This will allow automatic creation of sum__ and avg__ metrics * formatting for line length at 80 chars * Reformating again, for the mandatory 79 chars maximum. --- superset/connectors/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/connectors/base.py b/superset/connectors/base.py index 10c5dd66bf56e..982b3bd75898a 100644 --- a/superset/connectors/base.py +++ b/superset/connectors/base.py @@ -168,7 +168,10 @@ class BaseColumn(AuditMixinNullable, ImportMixin): def __repr__(self): return self.column_name - num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL', 'NUMERIC') + num_types = ( + 'DOUBLE', 'FLOAT', 'INT', 'BIGINT', + 'LONG', 'REAL', 'NUMERIC', 'DECIMAL' + ) date_types = ('DATE', 'TIME', 'DATETIME') str_types = ('VARCHAR', 'STRING', 'CHAR')