You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interval is a value type that Databend understands as it is used in date addition. However, there is no current way to store an Interval value like can be done in Postgres.
While Snowflake and MySQL also do not support the Interval type, Postgres does and it makes life so much easier since it is quite common to store duration information. Both Parquet and Arrow do support an Interval/Duration data type.
Summary
Interval is a value type that Databend understands as it is used in date addition. However, there is no current way to store an Interval value like can be done in Postgres.
While Snowflake and MySQL also do not support the Interval type, Postgres does and it makes life so much easier since it is quite common to store duration information. Both Parquet and Arrow do support an Interval/Duration data type.
The Parquet standard does support an Interval data type as defined here: https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#interval
Arrow also supports a Duration type with varying levels of resolution. It would likely be safe to pick a reasonable default resolution for Arrow usage: https://arrow.apache.org/docs/python/generated/pyarrow.duration.html#pyarrow.duration. This conversion function seems to suggest that might be milliseconds: https://arrow.apache.org/rust/parquet/arrow/arrow_writer/fn.get_interval_dt_array_slice.html
The ideal approach would be one where an Interval value could be marshalled and unmarshalled from Parquet using native Parquet and Arrow types.
The text was updated successfully, but these errors were encountered: