Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 23, 2024
1 parent 97f05e9 commit 79210b1
Show file tree
Hide file tree
Showing 24 changed files with 116 additions and 87 deletions.
8 changes: 4 additions & 4 deletions clients/bigquery/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ func (BigQueryDialect) KindForDataType(rawBqType string, _ string) (typing.KindD
case "array":
return typing.Array, nil
case "timestamp":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")
case "datetime":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "")
case "time":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")
case "date":
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")
default:
return typing.Invalid, nil
}
Expand Down
14 changes: 7 additions & 7 deletions clients/bigquery/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ func TestBigQueryDialect_KindForDataType(t *testing.T) {
"record": typing.Struct,
"json": typing.Struct,
// Datetime
"datetime": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"timestamp": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"time": typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
"date": typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
"datetime": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"timestamp": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"time": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
"date": typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
//Invalid
"foo": typing.Invalid,
"foofoo": typing.Invalid,
Expand Down Expand Up @@ -130,9 +130,9 @@ func TestBigQueryDialect_KindForDataType(t *testing.T) {

func TestBigQueryDialect_KindForDataType_NoDataLoss(t *testing.T) {
kindDetails := []typing.KindDetails{
typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
typing.String,
typing.Boolean,
typing.Struct,
Expand Down
19 changes: 11 additions & 8 deletions clients/bigquery/storagewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,29 @@ func TestColumnToTableFieldSchema(t *testing.T) {
}
{
// ETime - Time:
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")))
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")))
assert.NoError(t, err)
assert.Equal(t, storagepb.TableFieldSchema_TIME, fieldSchema.Type)
}
{
// ETime - Date:
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")))
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")))
assert.NoError(t, err)
assert.Equal(t, storagepb.TableFieldSchema_DATE, fieldSchema.Type)
}
{
// ETime - TimestampTZ:
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")))
fieldSchema, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")))
assert.NoError(t, err)
assert.Equal(t, storagepb.TableFieldSchema_TIMESTAMP, fieldSchema.Type)
}
{
// ETime - Invalid:
_, err := columnToTableFieldSchema(columns.NewColumn("foo", typing.NewExtendedTimeDetails(typing.ETime, "", "")))
assert.ErrorContains(t, err, "unsupported extended time details type:")
nestedKind, err := typing.NewExtendedTimeDetails(typing.ETime, "", "")
assert.ErrorContains(t, err, "unknown kind type")

_, err = columnToTableFieldSchema(columns.NewColumn("foo", nestedKind))
assert.ErrorContains(t, err, `unsupported column kind: "invalid"`)
}
{
// Struct:
Expand Down Expand Up @@ -112,9 +115,9 @@ func TestRowToMessage(t *testing.T) {
columns.NewColumn("c_numeric", typing.EDecimal),
columns.NewColumn("c_string", typing.String),
columns.NewColumn("c_string_decimal", typing.String),
columns.NewColumn("c_time", typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")),
columns.NewColumn("c_date", typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")),
columns.NewColumn("c_datetime", typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")),
columns.NewColumn("c_time", typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")),
columns.NewColumn("c_date", typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")),
columns.NewColumn("c_datetime", typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")),
columns.NewColumn("c_struct", typing.Struct),
columns.NewColumn("c_array", typing.Array),
}
Expand Down
6 changes: 3 additions & 3 deletions clients/databricks/dialect/typing.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ func (DatabricksDialect) KindForDataType(rawType string, _ string) (typing.KindD
case "boolean":
return typing.Boolean, nil
case "date":
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")
case "double", "float":
return typing.Float, nil
case "int":
return typing.KindDetails{Kind: typing.Integer.Kind, OptionalIntegerKind: typing.ToPtr(typing.IntegerKind)}, nil
case "smallint", "tinyint":
return typing.KindDetails{Kind: typing.Integer.Kind, OptionalIntegerKind: typing.ToPtr(typing.SmallIntegerKind)}, nil
case "timestamp":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")
case "timestamp_ntz":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "")
}

return typing.Invalid, fmt.Errorf("unsupported data type: %q", rawType)
Expand Down
12 changes: 9 additions & 3 deletions clients/databricks/dialect/typing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ func TestDatabricksDialect_KindForDataType(t *testing.T) {
// Date
kd, err := DatabricksDialect{}.KindForDataType("DATE", "")
assert.NoError(t, err)
assert.Equal(t, typing.KindDetails{Kind: typing.ETime.Kind, ExtendedTimeDetails: &ext.NestedKind{Type: ext.DateKindType}}, kd)
assert.Equal(t, typing.KindDetails{
Kind: typing.ETime.Kind,
ExtendedTimeDetails: &ext.NestedKind{
Type: ext.DateKindType,
Format: ext.PostgresDateFormat,
},
}, kd)
}
{
// Double
Expand Down Expand Up @@ -145,13 +151,13 @@ func TestDatabricksDialect_KindForDataType(t *testing.T) {
// Timestamp
kd, err := DatabricksDialect{}.KindForDataType("TIMESTAMP", "")
assert.NoError(t, err)
assert.Equal(t, typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), kd)
assert.Equal(t, typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), kd)
}
{
// Timestamp NTZ
kd, err := DatabricksDialect{}.KindForDataType("TIMESTAMP_NTZ", "")
assert.NoError(t, err)
assert.Equal(t, typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), kd)
assert.Equal(t, typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), kd)
}
{
// Variant
Expand Down
8 changes: 4 additions & 4 deletions clients/mssql/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ func (MSSQLDialect) KindForDataType(rawType string, stringPrecision string) (typ
case
"datetime",
"datetime2":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "")
case "datetimeoffset":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")
case "time":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")
case "date":
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")
case "bit":
return typing.Boolean, nil
case "text":
Expand Down
8 changes: 4 additions & 4 deletions clients/mssql/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func TestMSSQLDialect_KindForDataType(t *testing.T) {
"float": typing.Float,
"real": typing.Float,
"bit": typing.Boolean,
"date": typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
"time": typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
"datetime": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"datetime2": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"date": typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
"time": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
"datetime": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"datetime2": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
}

for col, expectedKind := range colToExpectedKind {
Expand Down
8 changes: 4 additions & 4 deletions clients/redshift/dialect/typing.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ func (RedshiftDialect) KindForDataType(rawType string, stringPrecision string) (
case "double precision":
return typing.Float, nil
case "timestamp", "timestamp without time zone":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "")
case "timestamp with time zone":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")
case "time without time zone":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")
case "date":
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")
case "boolean":
return typing.Boolean, nil
}
Expand Down
4 changes: 2 additions & 2 deletions clients/redshift/dialect/typing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ func TestRedshiftDialect_DataTypeForKind(t *testing.T) {
// Timestamps
{
// With timezone
assert.Equal(t, "timestamp with time zone", RedshiftDialect{}.DataTypeForKind(typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), false))
assert.Equal(t, "timestamp with time zone", RedshiftDialect{}.DataTypeForKind(typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), false))
}
{
// Without timezone
assert.Equal(t, "timestamp without time zone", RedshiftDialect{}.DataTypeForKind(typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), false))
assert.Equal(t, "timestamp without time zone", RedshiftDialect{}.DataTypeForKind(typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), false))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions clients/snowflake/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *SnowflakeTestSuite) TestMutateColumnsWithMemoryCacheDeletions() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"created_at": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down Expand Up @@ -58,7 +58,7 @@ func (s *SnowflakeTestSuite) TestShouldDeleteColumn() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"created_at": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down Expand Up @@ -97,7 +97,7 @@ func (s *SnowflakeTestSuite) TestManipulateShouldDeleteColumn() {
"customer_id": typing.Integer,
"price": typing.Float,
"name": typing.String,
"created_at": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"created_at": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
} {
cols.AddColumn(columns.NewColumn(colName, kindDetails))
}
Expand Down
8 changes: 4 additions & 4 deletions clients/snowflake/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ func (SnowflakeDialect) KindForDataType(snowflakeType string, _ string) (typing.
case "array":
return typing.Array, nil
case "timestamp_ltz", "timestamp_tz":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, "")
case "timestamp", "datetime", "timestamp_ntz":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "")
case "time":
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "")
case "date":
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""), nil
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "")
default:
return typing.Invalid, nil
}
Expand Down
6 changes: 3 additions & 3 deletions clients/snowflake/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ func TestSnowflakeDialect_KindForDataType_DateTime(t *testing.T) {

func TestSnowflakeDialect_KindForDataType_NoDataLoss(t *testing.T) {
kindDetails := []typing.KindDetails{
typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, ""),
typing.MustNewExtendedTimeDetails(typing.ETime, ext.DateKindType, ""),
typing.String,
typing.Boolean,
typing.Struct,
Expand Down
2 changes: 1 addition & 1 deletion clients/snowflake/snowflake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (s *SnowflakeTestSuite) TestExecuteMergeDeletionFlagRemoval() {

snowflakeColToKindDetailsMap := map[string]typing.KindDetails{
"id": typing.Integer,
"created_at": typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"created_at": typing.MustNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, ""),
"name": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeleteColumnMarker: typing.Boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/debezium/converters/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (Date) layout() string {
}

func (d Date) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, d.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.DateKindType, d.layout())
}

func (d Date) Convert(value any) (any, error) {
Expand Down
10 changes: 5 additions & 5 deletions lib/debezium/converters/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (Time) layout() string {
}

func (t Time) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, t.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, t.layout())
}

func (t Time) Convert(val any) (any, error) {
Expand All @@ -36,7 +36,7 @@ func (NanoTime) layout() string {
}

func (n NanoTime) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, n.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, n.layout())
}

func (n NanoTime) Convert(value any) (any, error) {
Expand All @@ -56,7 +56,7 @@ func (MicroTime) layout() string {
}

func (m MicroTime) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, m.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, m.layout())
}

func (m MicroTime) Convert(value any) (any, error) {
Expand All @@ -76,7 +76,7 @@ func (ZonedTimestamp) layout() string {
}

func (z ZonedTimestamp) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, z.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimestampTZKindType, z.layout())
}

func (z ZonedTimestamp) Convert(value any) (any, error) {
Expand Down Expand Up @@ -112,7 +112,7 @@ func (t TimeWithTimezone) layout() string {
}

func (t TimeWithTimezone) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, t.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, t.layout())
}

func (t TimeWithTimezone) Convert(value any) (any, error) {
Expand Down
4 changes: 2 additions & 2 deletions lib/debezium/converters/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestTime_Convert(t *testing.T) {
}

func TestNanoTime_Converter(t *testing.T) {
assert.Equal(t, typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, NanoTime{}.layout()), NanoTime{}.ToKindDetails())
assert.Equal(t, typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, NanoTime{}.layout()), NanoTime{}.ToKindDetails())
{
// Invalid data
_, err := NanoTime{}.Convert("123")
Expand All @@ -158,7 +158,7 @@ func TestNanoTime_Converter(t *testing.T) {
}

func TestMicroTime_Converter(t *testing.T) {
assert.Equal(t, typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, MicroTime{}.layout()), MicroTime{}.ToKindDetails())
assert.Equal(t, typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimeKindType, MicroTime{}.layout()), MicroTime{}.ToKindDetails())
{
// Invalid data
_, err := MicroTime{}.Convert("123")
Expand Down
6 changes: 3 additions & 3 deletions lib/debezium/converters/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func (Timestamp) layout() string {
}

func (t Timestamp) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, t.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, t.layout())
}

func (t Timestamp) Convert(value any) (any, error) {
Expand All @@ -34,7 +34,7 @@ func (MicroTimestamp) layout() string {
}

func (mt MicroTimestamp) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, mt.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, mt.layout())
}

func (mt MicroTimestamp) Convert(value any) (any, error) {
Expand All @@ -50,7 +50,7 @@ func (mt MicroTimestamp) Convert(value any) (any, error) {
type NanoTimestamp struct{}

func (nt NanoTimestamp) ToKindDetails() typing.KindDetails {
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, nt.layout())
return typing.OldNewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, nt.layout())
}

func (NanoTimestamp) layout() string {
Expand Down
Loading

0 comments on commit 79210b1

Please sign in to comment.