googleapis / nodejs-bigquery

Node.js client for Google Cloud BigQuery: A fast, economical and fully-managed enterprise data warehouse for large-scale data analytics.
https://cloud.google.com/bigquery/
Apache License 2.0
468 stars 211 forks source link

fix: parsing zero value timestamp #1355

Closed alvarowolfx closed 7 months ago

alvarowolfx commented 7 months ago

PreciseDate class fails when instantiated with zero value ( number 0 or BigInt(0)). Using PreciseDate.parseFull + preciseDateInstance.setFulltime manually with BigInt skips the code paths that doesn't check for zero.

Reference:

Fixes #1353 🦕 Supersedes #1354