You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/09/15 04:53:41 UTC

[GitHub] elisabetao commented on issue #2382: impala can't render element of type

elisabetao commented on issue #2382: impala can't render element of type <class 'impala.sqlalchemy.INT'>
URL: https://github.com/apache/incubator-superset/issues/2382#issuecomment-307421337
 
 
   I am having the same  sqlalchemy compiler error triggered  for some impala types:  
   impala.sqlalchemy.STRING , impala.sqlalchemy.INT,etc. I tried setting bind engine in the metadata_params, but that did not help.
   @qinzl1 - were you able to get this working? Thanks 
   
   UPDATE: This issue seems to be caused by the fact that the sqlalchemy GenericTypeCompiler class has no implementation of the impyla/impala  INT (visit) type (similar for double,etc) which impala.sqlalchemy (https://github.com/cloudera/impyla/blob/master/impala/sqlalchemy.py) implements and tries to resolve.
   To alleviate this one can try updating the sqlalchemy.sql.compiler.GenericTypeCompiler (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/sql/compiler.py) by adding 
   ```
   def visit_INT(self, type_, **kw):
           return "INTEGER"
   or maybe update  ImpalaTypeCompiler(GenericTypeCompiler) to return 
   def visit_INT(self, type_):
   ?  return 'INTEGER'
   ```
 
----------------------------------------------------------------
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