superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] villebro commented on a change in pull request #6987: Add support for postgres bytea type
Date Sat, 16 Mar 2019 06:03:02 GMT
villebro commented on a change in pull request #6987: Add support for postgres bytea type
URL: https://github.com/apache/incubator-superset/pull/6987#discussion_r266190581
 
 

 ##########
 File path: superset/utils/core.py
 ##########
 @@ -340,6 +340,8 @@ def base_json_conv(obj):
         return str(obj)
     elif isinstance(obj, timedelta):
         return str(obj)
+    elif isinstance(obj, memoryview):
+        return str(obj.tobytes(), 'utf8')
 
 Review comment:
   Thanks @john-bodley for the link, this functionality is now clearer to me. In retrospect
calling `bytes.decode('utf-8')` might have been more intuitive.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Mime
View raw message