evidence icon indicating copy to clipboard operation
evidence copied to clipboard

Null and Zeros result in error in data table column with contentType=delta

Open mjbloch opened this issue 1 year ago • 2 comments

Steps To Reproduce

```sql test
select 
    0 as value_0,
    null as value_null,
    0 as delta_0,
    null as delta_null
```

<DataTable data={test}>
    <Column id=value_0 />
    <Column id=value_null />
    <Column id=delta_0 contentType=delta />
    <Column id=delta_null contentType=delta />
</DataTable>

Environment

  • Node version (node -v): 20.11.1
  • npm version (npm -v): 10.2.4
  • OS: mac
  • Browser: Chrone
  • Database: Redshift (appears to be DB agnostic)

Expected Behavior

Would expect delta of zero to show as zero with neither up or down arrow. Would expect null delta to appear similar to null values in the base format for data tables (dash line '-')

Actual Behaviour

Rather than showing zeros or null - showing 'error' in data table cell. image

Workarounds

Anything you can do in advance of this being fixed? Not that I've found.

Discussion in Slack

https://evidencedev.slack.com/archives/C023LRB9Z40/p1711755829227349

mjbloch avatar Mar 30 '24 03:03 mjbloch

Thanks @mjbloch! I can see this currently reproducing on here too.

https://mdsinabox.com/ncaaf/conferences/

Looks like 0 values aren't rendering right too.

matsonj avatar Mar 30 '24 03:03 matsonj

Thanks for flagging this - should have a patch out today

hughess avatar Mar 30 '24 12:03 hughess

Fixed in #1844

hughess avatar May 13 '24 13:05 hughess