Commit baf97e5
committed
bigquery: drop timestamp string replacement
since https://issuetracker.google.com/issues/35905946 is fixed, bq server side
now support RFC3339 format natively, hence no longer necessary to do string
replacement for timestamp RFC3339 format
$ node -p 'new Date().toJSON()'
2017-10-03T02:41:33.693Z
$ bq query --parameter ts:TIMESTAMP:'2017-10-03T02:41:33.693Z' '#standardSQL
SELECT FORMAT("%T", @ts) AS ts'
Waiting on bqjob_r....... (0s) Current status: DONE
+----------------------------------------+
| ts |
+----------------------------------------+
| TIMESTAMP "2017-10-03 02:41:33.693+00" |
+----------------------------------------+
with this change:
$ node -e 'const bigquery = require("@google-cloud/bigquery")();
bigquery.query(`#standardSQL
SELECT TIMESTAMP "2017-10-03T02:41:33.693Z" AS ts`)
.then(([ res ]) => console.log(res))'
[ { ts: { value: '2017-10-03T02:41:33.693Z' } } ]
fixes googleapis#26311 parent a3a946e commit baf97e5
2 files changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 233 | + | |
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
0 commit comments