Skip to content

Incorrect Values Rendered with uint8 Column on Datagrid #1084

Closed
@yipalber

Description

Bug Report

Steps to Reproduce:

  1. Create an arrow file that includes a uint8 column
  2. Pass the ArrayBuffer data to perspectiveViewer.update(...)

Expected Result:

Rendered datagrid should be equivalent to what is printed with its pd.Dataframe and pa.Table equivalents. The first two sections show the pd.Dataframe values, pa.Table slots, and pa.Table.schema:

<Dataframe.info(memory_usage='deep')>
    col_0       col_1      col_2       col_3     col_4  col_5
0   2020-05-19  name         0           0         0      0
1   2020-05-19  name         0           0         0      0
2   2020-05-19  name         0           0         0      0
3   2020-05-19  name         0           0         0      0
4   2020-05-19  name         0           0         0      0
5   2020-05-19  name         0           0         0      0
6   2020-05-19  name         0           0         0      0
7   2020-05-19  name         0           0         0      0
8   2020-05-19  name         0           0         0      0
9   2020-05-19  name         0           0         0      0
10  2020-05-19  name         0           0         0      0
11  2020-05-19  name         0           0         0      0
12  2020-05-19  name         0           0         0      0
13  2020-05-19  name         0           0         0      0
14  2020-05-19  name         0       13966    -13966      1
15  2020-05-19  name         0           0         0      0
16  2020-05-19  name         0           0         0      0
17  2020-05-19  name         0           1        -1      0
18  2020-05-19  name         0           0         0      0
19  2020-05-19  name         0      -39421     39421      1
--------------------------------------------------------------------
[<pyarrow.lib.ChunkedArray object at 0x7f7d540c8d68>
[[...]],
<pyarrow.lib.ChunkedArray object at 0x7f7d540c8368>
[[...]],
<pyarrow.lib.ChunkedArray object at 0x7f7d540c8818>
[[...]],
<pyarrow.lib.ChunkedArray object at 0x7f7d540c8c28>
[[...]],
<pyarrow.lib.ChunkedArray object at 0x7f7d540c8bd8>
[[...]],
<pyarrow.lib.ChunkedArray object at 0x7f7d540c89a8>
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1]]
]
column_0: date32[day]
column_1: string
column_2: int32
column_3: int32
column_4: int32
column_5: uint8

Actual Result:

What the last section shows what is rendered on the browser-side. Notice col_5 has a difference in values in multiple rows (eg. row 4 and row 5), compared to above:

bug_report

Environment:

Running Perspective webpack plugin, datagrid, and d3fc on the latest (0.5.0).

Additional Context

From briefly looking over the source code, could this be a casting issue (ie. in emscripten.cpp)?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions