Skip to content

Apache DataFusion SQL Query Engine

ARROW-316: [Format] Changes to Date metadata format per discussion in ARROW-316

Wes McKinney521c0ec9e532
diff --git a/format/Message.fbs b/format/Message.fbs
index 2af26d4dc5..e56366d436 100644
--- a/format/Message.fbs
+++ b/format/Message.fbs
@@ -81,8 +81,19 @@ table Decimal {
scale: int;
}
-/// Date is a 64-bit type representing milliseconds since the UNIX epoch
+enum DateUnit: short {
+ DAY,
+ MILLISECOND
+}
+
+/// Date is either a 32-bit or 64-bit type representing elapsed time since UNIX
+/// epoch (1970-01-01), stored in either of two units:
+///
+/// * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
+/// leap seconds), where the values are evenly divisible by 86400000
+/// * Days (32 bits) since the UNIX epoch
table Date {
+ unit: DateUnit;
}
enum TimeUnit: short { SECOND, MILLISECOND, MICROSECOND, NANOSECOND }