Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyarrow does not know how to serialize objects of type #8396

Closed
3 tasks done
blcksrx opened this issue Oct 15, 2019 · 7 comments
Closed
3 tasks done

pyarrow does not know how to serialize objects of type #8396

blcksrx opened this issue Oct 15, 2019 · 7 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days

Comments

@blcksrx
Copy link

blcksrx commented Oct 15, 2019

sql_lab and also visualization doesn't work because of pyarrow can't serialize objects

Expected results

return query result

Actual results

pyarrow does not know how to serialize objects of type <class 'pandas.core.arrays.integer.IntegerArray'>.

Screenshots

Screenshot from 2019-10-15 18-24-34

How to reproduce the bug

  1. Go to sql_lab
  2. Run a query like SELECT *
  3. See error

Environment

  • superset version: branch master on 2019-10-12 18:38
  • python version: 3.7
  • node.js version: 10.16.3
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Oct 15, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.84. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@villebro
Copy link
Member

Please share database type and column types of the table causing the error.

@blcksrx
Copy link
Author

blcksrx commented Oct 18, 2019

It doesn't matter! this error happens on this code:

data = (
                pa.default_serialization_context()
                .serialize(cdf.raw_df)
                .to_buffer()
                .to_pybytes()
            )

here is the refrenc uri on sql_lab:
https://github.com/apache/incubator-superset/blob/master/superset/sql_lab.py#L275

Also, you can test this issue with trying this code:

import pandas as pd 
import pyarrow as pa
from  pandas.core.arrays.integer import IntegerArray

int_array = pd.array([1, None, 3], dtype=pd.Int32Dtype())
pa.default_serialization_context().serialize(int_array).to_buffer().to_pybytes()

Here is the arrow issue tracker Uri, that I reported this bug:
https://issues.apache.org/jira/browse/ARROW-6900?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=16952842#comment-16952842

@robdiciuccio
Copy link
Member

Thanks for reporting this issue. This may be related to #8225. Are you using Presto by chance?

You can disable msgpack and pyarrow serialization by setting RESULTS_BACKEND_USE_MSGPACK = False in superset_config.py until this issue is resolved.

@blcksrx
Copy link
Author

blcksrx commented Oct 19, 2019

Yes. I'm using Presto. But I tried the sqlite too.

@stale
Copy link

stale bot commented Dec 18, 2019

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.

@stale stale bot added the inactive Inactive for >= 30 days label Dec 18, 2019
@stale stale bot closed this as completed Dec 25, 2019
@robdiciuccio
Copy link
Member

@blcksrx This should now be resolved via #8733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

3 participants