surapuramakhil commented on PR #28268: URL: https://github.com/apache/superset/pull/28268#issuecomment-2093962974
@nytai, I have tried Adding column mutators - for converting Postgres adoptor DateTimeTZArray to a simpler one line (datetime,datetime) but it looks like a much more bigger change than expected. I just added some additional code for debuging - it's apparent that SQLAlchamy Postgres dialect doesn't support All column types which Postgres Adopter supports. ```py description = cursor.description or [] # Create a mapping between column name and a mutator function to normalize # values with. The first two items in the description row are # the column name and type. logger.info(f'Description: {description}') logger.info(f'column_type_mutators: {cls.column_type_mutators}') for row in description: logger.info(f'row: {row}') logger.info(f'get_datatype: {cls.get_datatype(row[1])}') logger.info(f'get_sqla_column_type: {cls.get_sqla_column_type(cls.get_datatype(row[1]))}') column_mutators = { row[0]: func for row in description if ( func := cls.column_type_mutators.get( type(cls.get_sqla_column_type(cls.get_datatype(row[1]))) ) ) } ``` Above code snippet is near https://github.com/apache/superset/blob/f5843fe588112c5c303215945a36fda0845c9e99/superset/db_engine_specs/base.py#L953 Dubug infromation was: ```sh uperset_app | 2024-05-04 02:11:20,685:INFO:root:Description: (Column(name='array_agg', type_code=3911), Column(name='event_name', type_code=25)) superset_app | 2024-05-04 02:11:20,685:INFO:root:column_type_mutators: {<class 'psycopg2._range.DateTimeTZRange'>: <function PostgresEngineSpec.<lambda> at 0xffff6c5a35b0>, <class 'sqlalchemy.dialects.postgresql.ranges.TSTZRANGE'>: <function PostgresEngineSpec.<lambda> at 0xffff6c5a3640>} superset_app | 2024-05-04 02:11:20,685:INFO:root:row: Column(name='array_agg', type_code=3911) superset_app | 2024-05-04 02:11:20,685:INFO:root:get_datatype: tstzrangeARRAY superset_app | 2024-05-04 02:11:20,685:INFO:root:get_sqla_column_type: None ``` its none since tstzrangeARRAY doesn't exits. Any idea or suggestion? -- 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. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org