Skip to content

dates not detected in arrow tables #269

Open
@Fil

Description

@Fil

A bug where dates are shown as numbers in the table; it should have been covered by #263, but in this case we have field.type.unit==0 instead of 1.

The bug can be seen in Framework with the following page:

---
sql:
  launches: data/launches.csv
---

# Rocket launches 🚀

```sql echo
SELECT * FROM launches;
```

Capture d’écran 2024-10-15 à 18 36 21

I can't find the documentation for what this "unit 0" means. The source code https://github.com/apache/arrow/blob/main/js/src/fb/time.ts seems to indicate that these are seconds. If I change

return field.type.unit === 1 ? "date" : "number"; // millisecond
to accept 0 as a date, the dates appear correctly in the table.

Capture d’écran 2024-10-15 à 18 35 06

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions