superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [Data Source Editor] Use type of NUMERIC instead of NUMBER and make editor accept freeform types (#7123)
Date Wed, 03 Apr 2019 17:34:08 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 8830d3f  [Data Source Editor] Use type of NUMERIC instead of NUMBER and make editor
accept freeform types (#7123)
8830d3f is described below

commit 8830d3f96e7c9767e5be55d5e1387a5305cd017d
Author: agrawaldevesh <dagrawal@uber.com>
AuthorDate: Wed Apr 3 10:33:59 2019 -0700

    [Data Source Editor] Use type of NUMERIC instead of NUMBER and make editor accept freeform
types (#7123)
---
 superset/assets/src/datasource/DatasourceEditor.jsx | 4 ++--
 superset/connectors/base/models.py                  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/assets/src/datasource/DatasourceEditor.jsx b/superset/assets/src/datasource/DatasourceEditor.jsx
index 60628d9..57eb1be 100644
--- a/superset/assets/src/datasource/DatasourceEditor.jsx
+++ b/superset/assets/src/datasource/DatasourceEditor.jsx
@@ -43,7 +43,7 @@ import withToasts from '../messageToasts/enhancers/withToasts';
 import './main.css';
 
 const checkboxGenerator = (d, onChange) => <CheckboxControl value={d} onChange={onChange}
/>;
-const DATA_TYPES = ['STRING', 'NUMBER', 'DATETIME'];
+const DATA_TYPES = ['STRING', 'NUMERIC', 'DATETIME'];
 
 function CollectionTabTitle({ title, collection }) {
   return (
@@ -92,7 +92,7 @@ function ColumnCollectionTable({
               <Field
                 fieldKey="type"
                 label={t('Data Type')}
-                control={<SelectControl choices={DATA_TYPES} name="type" />}
+                control={<SelectControl choices={DATA_TYPES} name="type" freeForm />}
               />}
             <Field
               fieldKey="python_date_format"
diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py
index 958bea0..eed92a6 100644
--- a/superset/connectors/base/models.py
+++ b/superset/connectors/base/models.py
@@ -363,7 +363,7 @@ class BaseColumn(AuditMixinNullable, ImportMixin):
         return self.column_name
 
     num_types = (
-        'DOUBLE', 'FLOAT', 'INT', 'BIGINT',
+        'DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'NUMBER',
         'LONG', 'REAL', 'NUMERIC', 'DECIMAL', 'MONEY',
     )
     date_types = ('DATE', 'TIME', 'DATETIME')


Mime
View raw message