From fa08b76683317c40877a8df71b4ee58d0acc3c10 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 15 Oct 2024 17:42:00 -0700 Subject: [PATCH] Update. --- clients/bigquery/dialect/dialect.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/bigquery/dialect/dialect.go b/clients/bigquery/dialect/dialect.go index ee84f179b..d2f19dd8a 100644 --- a/clients/bigquery/dialect/dialect.go +++ b/clients/bigquery/dialect/dialect.go @@ -53,6 +53,8 @@ func (BigQueryDialect) DataTypeForKind(kindDetails typing.KindDetails, _ bool) s // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_type // We should be using TIMESTAMP since it's an absolute point in time. return "timestamp" + case ext.TimestampNTZKindType: + return "datetime" case ext.DateKindType: return "date" case ext.TimeKindType: @@ -103,8 +105,10 @@ func (BigQueryDialect) KindForDataType(rawBqType string, _ string) (typing.KindD return typing.Struct, nil case "array": return typing.Array, nil - case "datetime", "timestamp": + case "timestamp": return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampTzKindType), nil + case "datetime": + return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampNTZKindType), nil case "time": return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType), nil case "date":