You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/30 23:07:25 UTC

[GitHub] hughhhh closed pull request #5302: [DeckGL] Raise error with null values

hughhhh closed pull request #5302: [DeckGL] Raise error with null values
URL: https://github.com/apache/incubator-superset/pull/5302
 
 
   

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/exceptions.py b/superset/exceptions.py
index 0a27b514a8..8059439452 100644
--- a/superset/exceptions.py
+++ b/superset/exceptions.py
@@ -26,5 +26,9 @@ class NoDataException(SupersetException):
     status = 400
 
 
+class NullValueException(SupersetException):
+    status = 400
+
+
 class SupersetTemplateException(SupersetException):
     pass
diff --git a/superset/viz.py b/superset/viz.py
index a595e49b68..a460b9f416 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -38,6 +38,7 @@
 from six.moves import cPickle as pkl, reduce
 
 from superset import app, cache, get_manifest_file, utils
+from superset.exceptions import NullValueException
 from superset.utils import DTTM_ALIAS, JS_MAX_INTEGER, merge_extra_filters
 
 
@@ -2107,6 +2108,11 @@ def tupleify(s):
             df[key] = list(zip(latlong.apply(lambda x: x[0]),
                                latlong.apply(lambda x: x[1])))
             del df[spatial.get('geohashCol')]
+
+        if df.get(key) is None:
+            raise NullValueException(_('Encountered invalid NULL spatial entry, \
+                                       please consider filtering those out'))
+
         return df
 
     def query_obj(self):


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org