From 8426a13e448165a2ae20ff0e6d51b6d11a099497 Mon Sep 17 00:00:00 2001 From: Arttu Voutilainen Date: Mon, 22 Jul 2024 16:49:14 +0200 Subject: [PATCH] docs --- datafusion/substrait/src/logical_plan/consumer.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datafusion/substrait/src/logical_plan/consumer.rs b/datafusion/substrait/src/logical_plan/consumer.rs index 77255a1f244b..a650d9797fd1 100644 --- a/datafusion/substrait/src/logical_plan/consumer.rs +++ b/datafusion/substrait/src/logical_plan/consumer.rs @@ -95,9 +95,11 @@ use substrait::proto::{ }; use substrait::proto::{FunctionArgument, SortField}; -// Substrait TimestampTz only says that the timestamp is relative to UTC, which -// is the same as the expectation for any NON-empty timezone in DF. Any timezone would give -// correct points on a timeline, but the timezone may get used for arithmetic and display. +// Substrait PrecisionTimestampTz indicates that the timestamp is relative to UTC, which +// is the same as the expectation for any non-empty timezone in DF, so any non-empty timezone +// results in correct points on the timeline, and we pick UTC as a reasonable default. +// However, DF uses the timezone also for some arithmetic and display purposes (see e.g. +// https://github.com/apache/arrow-rs/blob/ee5694078c86c8201549654246900a4232d531a9/arrow-cast/src/cast/mod.rs#L1749). const DEFAULT_TIMEZONE: &str = "UTC"; pub fn name_to_op(name: &str) -> Option {