Timestamp type in Velox #5060
Replies: 5 comments 3 replies
-
Hi, @Yuhta @mbasmanova @majetideepak There are some other questions about the current Timestamp.
|
Beta Was this translation helpful? Give feedback.
-
I find that Velox define the maximum value of nanos in velox/velox/dwio/common/IntCodecCommon.h Line 42 in f72d6c6 |
Beta Was this translation helpful? Give feedback.
-
@liujiayi771 @rui-mo The precision of timestamp values in Presto, Spark and Velox is different. One option is to define Presto-specific and Spark-specific timestamp types as logical types backed by BIGINT physical type. Adding a check for nanos to Timestamp constructor also might be helpful. Finally, it would be nice to update documentation at https://facebookincubator.github.io/velox/develop/types.html to explain how to use Velox's Timestamp type in Presto and Spark. |
Beta Was this translation helpful? Give feedback.
-
Hi @mbasmanova Do you think we should just limit the value of nanos, or allow the input of larger nanos, and correct it by rounding nanos to seconds? |
Beta Was this translation helpful? Give feedback.
-
I don't have a strong opinion, but generally prefer check + fail rather then silent adjust behaviors. |
Beta Was this translation helpful? Give feedback.
-
I find that TimestampType in Presto stores timestamp in long value with a TimeUnit. Spark also stores timestamp in long value with MICROSECONDS unit. But Velox uses seconds and nanos to represent timestamp, could you tell me the reason?
Beta Was this translation helpful? Give feedback.
All reactions