When split_by with a column of type "date" or "datetime", the internal viewport data is returned with column paths helpfully formatted as strings (helpfully due to a legacy internal format which does not properly support mixed types in column paths just yet). However, the column_paths() methods still returns t_tscalar, which sometimes is the same as the string representation, but is not when the type is "date" or "datetime". This caused Datagrid column group headers to show up as POSIX timestamps, but also caused the column paths to fail lookup when populating the table itself, causing the column to appears as all null.
This PR changes the behavior of the column_paths() method to explicitly to_string() column path values, and adds a test for both the column_paths() API and a browser integration test for the Datagrid split_by with a "date" column
Fixes #2544 and fixes #2306.
When
split_by
with a column of type"date"
or"datetime"
, the internal viewport data is returned with column paths helpfully formatted as strings (helpfully due to a legacy internal format which does not properly support mixed types in column paths just yet). However, thecolumn_paths()
methods still returnst_tscalar
, which sometimes is the same as the string representation, but is not when the type is"date"
or"datetime"
. This caused Datagrid column group headers to show up as POSIX timestamps, but also caused the column paths to fail lookup when populating the table itself, causing the column to appears as allnull
.This PR changes the behavior of the
column_paths()
method to explicitlyto_string()
column path values, and adds a test for both thecolumn_paths()
API and a browser integration test for the Datagridsplit_by
with a"date"
columnBefore:
After:
![test-failed-1](https://github.com/finos/perspective/assets/60666/8fd4c8ba-a667-4cc5-b9c1-d2909c247c75)