mistercrunch closed pull request #5948: [deck_polygon] implement null locations 
flag
URL: https://github.com/apache/incubator-superset/pull/5948
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx 
b/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx
index 69adf09ac2..6d683d3388 100644
--- a/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx
+++ b/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx
@@ -54,6 +54,5 @@ describe('TableElement', () => {
     wrapper.find('.table-remove').simulate('click');
     expect(wrapper.state().expanded).to.equal(false);
     expect(mockedActions.removeDataPreview.called).to.equal(true);
-    expect(mockedActions.removeTable.called).to.equal(true);
   });
 });
diff --git a/superset/assets/src/explore/controls.jsx 
b/superset/assets/src/explore/controls.jsx
index 86ac9f5cbb..15b04602df 100644
--- a/superset/assets/src/explore/controls.jsx
+++ b/superset/assets/src/explore/controls.jsx
@@ -712,16 +712,6 @@ export const controls = {
     }),
   },
 
-  polygon: {
-    type: 'SelectControl',
-    label: t('Polygon Column'),
-    validators: [v.nonEmpty],
-    description: t('Select the polygon column. Each row should contain 
JSON.array(N) of [longitude, latitude] points'),
-    mapStateToProps: state => ({
-      choices: (state.datasource) ? state.datasource.all_cols : [],
-    }),
-  },
-
   point_radius_scale: {
     type: 'SelectControl',
     freeForm: true,
diff --git a/superset/viz.py b/superset/viz.py
index 679c4d80cc..2b8e50683e 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -2135,13 +2135,18 @@ def process_spatial_data_obj(self, key, df):
         return df
 
     def add_null_filters(self):
+        fd = self.form_data
         spatial_columns = set()
         for key in self.spatial_control_keys:
             for column in self.get_spatial_columns(key):
                 spatial_columns.add(column)
 
-        if self.form_data.get('adhoc_filters') is None:
-            self.form_data['adhoc_filters'] = []
+        if fd.get('adhoc_filters') is None:
+            fd['adhoc_filters'] = []
+
+        line_column = fd.get('line_column')
+        if line_column:
+            spatial_columns.add(line_column)
 
         for column in sorted(spatial_columns):
             filter_ = to_adhoc({
@@ -2149,7 +2154,7 @@ def add_null_filters(self):
                 'op': 'IS NOT NULL',
                 'val': '',
             })
-            self.form_data['adhoc_filters'].append(filter_)
+            fd['adhoc_filters'].append(filter_)
 
     def query_obj(self):
         fd = self.form_data


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to