Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dates not detected in arrow tables #269

Open
Fil opened this issue Oct 15, 2024 · 0 comments
Open

dates not detected in arrow tables #269

Fil opened this issue Oct 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Fil
Copy link
Collaborator

Fil commented Oct 15, 2024

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

@Fil Fil added the bug Something isn't working label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant