diff --git a/pkg/converter/convert.go b/pkg/converter/convert.go index de49954..f545cb3 100644 --- a/pkg/converter/convert.go +++ b/pkg/converter/convert.go @@ -27,7 +27,7 @@ var ( ".google.protobuf.BoolValue": "BOOLEAN", ".google.protobuf.StringValue": "STRING", ".google.protobuf.BytesValue": "BYTES", - ".google.protobuf.Duration": "STRING", + ".google.protobuf.Duration": "INTERVAL", ".google.protobuf.Timestamp": "TIMESTAMP", } typeFromFieldType = map[descriptor.FieldDescriptorProto_Type]string{ diff --git a/pkg/converter/plugin_test.go b/pkg/converter/plugin_test.go index c35f0d6..083c2ed 100644 --- a/pkg/converter/plugin_test.go +++ b/pkg/converter/plugin_test.go @@ -416,7 +416,7 @@ func TestWellKnownTypes(t *testing.T) { { "name": "bool", "type": "BOOLEAN", "mode": "NULLABLE" }, { "name": "str", "type": "STRING", "mode": "NULLABLE" }, { "name": "bytes", "type": "BYTES", "mode": "NULLABLE" }, - { "name": "du", "type": "STRING", "mode": "NULLABLE" }, + { "name": "du", "type": "INTERVAL", "mode": "NULLABLE" }, { "name": "t", "type": "TIMESTAMP", "mode": "NULLABLE" } ]`, })