greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

Cannot show-table with Duration Type

Open fengjiachun opened this issue 1 year ago • 2 comments

What type of bug is this?

Unexpected error

What subsystems are affected?

Standalone mode

Minimal reproduce step

  1. Use the SDK to write data of type Duration, which will trigger automatic table creation in the database.
  2. Execute SHOW CREATE TABLE, then get a panic.

In fact, the reason is that there is a lack of mapping from the Duration type to the SQL type here.

What did you expect to see?

//

What did you see instead?

//

What operating system did you use?

Mac OS X 10.5 ARM

What version of GreptimeDB did you use?

0.6.0

Relevant log output and stack trace

No response

fengjiachun avatar Jan 24 '24 12:01 fengjiachun

In fact, the reason is that there is a lack of mapping from the Duration type to the SQL type

I remember when I realized here, there is no suitable SqlDataType for our Duration type, https://docs.rs/sqlparser/latest/sqlparser/ast/enum.DataType.html ,how about using SqlTypeNotSupportedSnafu here ?

QuenKar avatar Jan 24 '24 13:01 QuenKar

I think it's better not to support this type in gRPC writing.

killme2008 avatar Jan 24 '24 13:01 killme2008