villebro commented on a change in pull request #9322: fix: handle list of lists
from fetch_data
URL:
https://github.com/apache/incubator-superset/pull/9322#discussion_r394525404
##########
File path: superset/result_set.py
##########
@@ -97,7 +98,7 @@ def __init__(
# put data in a structured array so we can efficiently access each
column.
# cast `data` as list due to MySQL (others?) wrapping results with a
tuple.
- array = np.array(list(data), dtype=numpy_dtype)
+ array = np.array([tuple(row) for row in data], dtype=numpy_dtype)
Review comment:
We talked about that with @dpgaspar , the problem here is that numpy needs
to have this materialized, i.e. generators are off the table. I think we need
to revisit this if this becomes a problem, as I believe it should be possible
to skip numpy completely. But I would prefer not to have to open up that can of
worms right now.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]