Skip to content

Does Datafusion support manually specifying the timestamp and time precision? #13230

Closed Answered by findepi
caicancai asked this question in Q&A
Discussion options

You must be logged in to vote

On SQL frontend layer, only timestamp is currently supported and is synonymous to timestamp(9):

SQLDataType::Timestamp(None, tz_info) => {
let tz = if matches!(tz_info, TimezoneInfo::Tz)
|| matches!(tz_info, TimezoneInfo::WithTimeZone)
{
// Timestamp With Time Zone
// INPUT : [SQLDataType] TimestampTz + [RuntimeConfig] Time Zone
// OUTPUT: [ArrowDataType] Timestamp<TimeUnit, Some(Time Zone)>
self.context_provider.options().execution.time_zone.clone()
} else {
// Timestamp Without Time zone
None
};
Ok(DataType::Timestamp(TimeUnit::Nanosecond, tz.map(Into

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@caicancai
Comment options

Answer selected by caicancai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants