hasura / hasura/graphql-engine

Why BigQuery timestamp data type forces me to input Unix time?

Open
#7,837 0 comments 0 reactions 0 assignees View on GitHub
t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

While I can naturally query BigQuery timestamp in a very flexible manner, via Hasura I'm forced to use a Unix Epoch time to get the correct results:

https://github.com/hasura/graphql-engine/blob/a9e3a1b4bdaa731cad00ce88e0d8f8af2cd0b510/server/src-lib/Hasura/Backends/BigQuery/Execute.hs#L633

This behaviour is not the same for a Postgres backend.

Contributor guide

Open the contributing guide

Research direction

Start with server/src-lib/Hasura/Backends/BigQuery/Execute.hs at line 633 and inspect how timestamp values are handled for BigQuery. Compare the behavior described for BigQuery with the stated Postgres behavior. Done means timestamp queries can accept the flexible input expected by the issue rather than requiring Unix epoch time.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.