Run this code in jupyterlab (duckdb version was 0.10.1 but should work on any recent version)
import perspective
import duckdb
import pyarrow as pa
import io
# Create a column of unsigned 8-bit integers (0-255)
table = duckdb.sql("""
SELECT 0::utinyint AS unsigned_col
UNION ALL
SELECT 127::utinyint
UNION ALL
SELECT 128::utinyint
UNION ALL
SELECT 255::utinyint
""").arrow()
buffer = io.BytesIO()
with pa.ipc.new_file(buffer, table.schema) as writer:
writer.write_table(table)
bytes_object = buffer.getvalue()
perspective_table = perspective.Table(bytes_object)
perspective.PerspectiveWidget(perspective_table)
Expected Result:
Should be able to handle without overflow
Actual Result:
Environment:
perspective-python 2.10.0 running on Python 3.11, jupyterlab 3.6.5, MacOS 14.4.1.
Additional Context:
I first noticed this issue in the JS package but it was easier for me to create a replicable example in Python. This is a similar issue as the one I just posted in #2582, but seemed different enough to warrant a separate issue.
Bug Report
Steps to Reproduce:
Run this code in jupyterlab (duckdb version was 0.10.1 but should work on any recent version)
Expected Result:
Should be able to handle without overflow![image](https://github.com/finos/perspective/assets/18269460/88ab3511-7cd4-43e2-9972-7d224dfa8568)
Actual Result:
Environment:
perspective-python 2.10.0
running on Python3.11
, jupyterlab3.6.5
, MacOS14.4.1
.Additional Context:
I first noticed this issue in the JS package but it was easier for me to create a replicable example in Python. This is a similar issue as the one I just posted in #2582, but seemed different enough to warrant a separate issue.