Error when run query from SQL Lab using json_agg/json_build_object
See original GitHub issueA clear and concise description of what the bug is.
I need to run some query using json_agg/json_build_object in Postgres database, but I got an error
pyarrow.lib.ArrowNotImplementedError: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64>
My query:
SELECT id, json_agg(json_build_object(‘table_name’,table_name,‘database_id’,database_id)) FROM (SELECT * FROM tables) AS tables GROUP BY id
Error details:
ERROR:superset.sql_lab:Query 11: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64> Traceback (most recent call last): File “/app/superset/sql_lab.py”, line 170, in get_sql_results log_params=log_params, File “/app/superset/sql_lab.py”, line 391, in execute_sql_statements expand_data, File “/app/superset/sql_lab.py”, line 291, in _serialize_and_expand_data df = result_set.to_pandas_df() File “/app/superset/result_set.py”, line 152, in to_pandas_df return self.convert_table_to_df(self.table) File “/app/superset/result_set.py”, line 129, in convert_table_to_df return table.to_pandas(integer_object_nulls=True) File “pyarrow/array.pxi”, line 468, in pyarrow.lib._PandasConvertible.to_pandas File “pyarrow/table.pxi”, line 1238, in pyarrow.lib.Table._to_pandas File “/usr/local/lib/python3.6/site-packages/pyarrow/pandas_compat.py”, line 704, in table_to_blockmanager blocks = _table_to_blocks(options, table, categories) File “/usr/local/lib/python3.6/site-packages/pyarrow/pandas_compat.py”, line 976, in _table_to_blocks result = pa.lib.table_to_blocks(options, block_table, categories) File “pyarrow/table.pxi”, line 780, in pyarrow.lib.table_to_blocks File “pyarrow/error.pxi”, line 86, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64>
Screenshots
Environment
(please complete the following information):
- superset version: master branch
- python version: 3.6.9
- node.js version: 10
- npm version: 6.13.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
@lxhoang97 #9007 fixed an issue for a nested type ARRAY<MAP<STRING,STRING>>. Do you want to test it in your environment. thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue
.pinned
to prevent stale bot from closing the issue.