From 6f41d6d75b60b8ed5d87f69bb70a0b7308ecdfd3 Mon Sep 17 00:00:00 2001 From: Divjot Arora Date: Wed, 19 Aug 2026 14:44:54 +0000 Subject: [PATCH 1/2] Add FLBA(12) TIMESTAMP test file Co-authored-by: Isaac --- data/README.md | 1 + data/flba12_timestamp.md | 48 ++++++++++++++++++++++++++++++++++ data/flba12_timestamp.parquet | Bin 0 -> 1119 bytes 3 files changed, 49 insertions(+) create mode 100644 data/flba12_timestamp.md create mode 100644 data/flba12_timestamp.parquet diff --git a/data/README.md b/data/README.md index ea93558..b957007 100644 --- a/data/README.md +++ b/data/README.md @@ -65,6 +65,7 @@ | binary_truncated_min_max.parquet | A file containing six columns with exact, fully-truncated and partially-truncated max and min statistics and with the expected is_{min/max}_value_exact. (see [note](Binary-truncated-min-and-max-statistics)).| | json.parquet | A single optional BYTE_ARRAY column annotated with the JSON logical type (also carries the legacy converted type JSON). Four rows: `{"a":1}`, `{"a":1,"b":null}` (null field value inside a non-null document), `[1,null,3]` (null element inside an array), and a NULL row. See [note](#json-and-bson-logical-types) below. | | bson.parquet | A single optional BYTE_ARRAY column annotated with the BSON logical type (also carries the legacy converted type BSON). Three rows: BSON `{"a":1}`, `{"a":1,"b":null}` (null field value inside a non-null document), and a NULL row. See [note](#json-and-bson-logical-types) below. | +| flba12_timestamp.parquet | Three `FIXED_LEN_BYTE_ARRAY(12)` columns annotated with `TIMESTAMP`. See [flba12_timestamp.md](flba12_timestamp.md) for details. | TODO: Document what each file is in the table above. diff --git a/data/flba12_timestamp.md b/data/flba12_timestamp.md new file mode 100644 index 0000000..417d03e --- /dev/null +++ b/data/flba12_timestamp.md @@ -0,0 +1,48 @@ + + +# `flba12_timestamp.parquet` + +Three columns with physical type `FIXED_LEN_BYTE_ARRAY(12)` and logical type `TIMESTAMP`. + +## Schema + +``` +message flba12_timestamp { + optional fixed_len_byte_array(12) timestamp_millis (TIMESTAMP(MILLIS,true)); + optional fixed_len_byte_array(12) timestamp_micros (TIMESTAMP(MICROS,true)); + optional fixed_len_byte_array(12) timestamp_nanos (TIMESTAMP(NANOS,true)); +} +``` + +All columns use `TYPE_DEFINED_ORDER`. For the `timestamp_nanos` column, two out of the six rows +require more than 64 bits to represent. + +## Values + +The same six timestamp values appear in every column, only the unit scale differs. + +| Row | Instant (UTC) | Note | +|-----|---------------------------|---------------------------------------------| +| 0 | 1970-01-01T00:00:00Z | Epoch — all-zero bytes | +| 1 | 1970-01-01T00:00:01Z | Small positive | +| 2 | 1969-12-31T23:59:59Z | Small negative — exercises two's-complement | +| 3 | 2262-04-11T23:47:16Z | Near INT64-nanos max (epochSecond = 9 223 372 036) | +| 4 | 9999-12-31T23:59:59Z | Far future — NANOS exceeds INT64 | +| 5 | 0001-01-01T00:00:00Z | Far past — NANOS is below INT64 minimum | diff --git a/data/flba12_timestamp.parquet b/data/flba12_timestamp.parquet new file mode 100644 index 0000000000000000000000000000000000000000..828d70fd8e424507b833725b91ce362bfe85c691 GIT binary patch literal 1119 zcmWG=3^EjD5S_yaLJv0Xy~-{l$^#T&6XjrFU}9ikV73PmaPWc|&Sa4I^B)ctgkPvm z2I>F-i5v2l%AY~l3>uf;)*Oc@gIn`s<=S6tc&%}8;)m*IU^uY%1Kb)0&udF(A5j3y z9gs~q!{gEdagf6m21W;EusXOkQ%~LP=frCb!>L);aC^*BkHG9<(BM4_WY>e`%tX@v zU0k_`7tE2eea*aSA;{yBf=rSUJjnh7a*@3*$|NbqzyMW-WT&GjV?Z(=XgHG9 zP-QY=9HQqKf#xzu%7|TKM6j1IL)k!uJ{|&TIZ26zM)4(?xv9k^iMa)$Yz(4&q7tG^ z5(03s_}t8#oXp~!9zhuyu;;L;NG{3;tI$DK!H+N_FEJ0Izy_>9j7L&N(ngIzMwCy| zl!1*y64O3W1~DEnpdZdLs&Uw$1{rF2iZN)Q1SqO3FaUrt%^=Fe0JK@`4x6Z$*e4cI zKL(t3gM5Ny_ccbK<;W2MG#)9IK$hc{MYa4Bo2Z1?0ai52(E|y|?j_7XyOCoT$U};H zklnatQSI(x2io1o2DDr36^j^;8V8UP0i_NJ!SbTalGGx--29Z(9KF26+*Aqn)Cyo) z$Vp|82rfu0DlAPc(akMVC`&CW&dkqKFw`@&&@<2t_Hzsf_V5o;&`2uH%t=v5votkH zG&eFgG)b~dv`n@zwMa@$v`8{AG)qc0w6IJ`O-(X2FicC0~Q?tz@h~J Dn(90J literal 0 HcmV?d00001 From 2988135251ce38d5bfe5d0b6f04b50bcfee0ba78 Mon Sep 17 00:00:00 2001 From: Divjot Arora Date: Thu, 20 Aug 2026 16:47:44 +0000 Subject: [PATCH 2/2] address comments --- data/flba12_timestamp.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/data/flba12_timestamp.md b/data/flba12_timestamp.md index 417d03e..5b08b15 100644 --- a/data/flba12_timestamp.md +++ b/data/flba12_timestamp.md @@ -36,13 +36,14 @@ require more than 64 bits to represent. ## Values -The same six timestamp values appear in every column, only the unit scale differs. - -| Row | Instant (UTC) | Note | -|-----|---------------------------|---------------------------------------------| -| 0 | 1970-01-01T00:00:00Z | Epoch — all-zero bytes | -| 1 | 1970-01-01T00:00:01Z | Small positive | -| 2 | 1969-12-31T23:59:59Z | Small negative — exercises two's-complement | -| 3 | 2262-04-11T23:47:16Z | Near INT64-nanos max (epochSecond = 9 223 372 036) | -| 4 | 9999-12-31T23:59:59Z | Far future — NANOS exceeds INT64 | -| 5 | 0001-01-01T00:00:00Z | Far past — NANOS is below INT64 minimum | +The same six timestamp values appear in every column, only the unit scale differs. The values +below are interpreted as ISO-8601 timestamps in the Proleptic Gregorian calendar. + +| Row | Timestamp (UTC) | Epoch Seconds | Note | +|-----|-----------------------|------------------|---------------------------------------------| +| 0 | 1970-01-01T00:00:00Z | 0 | Epoch (all-zero bytes) | +| 1 | 1970-01-01T00:00:01Z | 1 | Small positive | +| 2 | 1969-12-31T23:59:59Z | -1 | Small negative (exercises two's-complement) | +| 3 | 2262-04-11T23:47:16Z | 9,223,372,036 | Near INT64-nanos max | +| 4 | 9999-12-31T23:59:59Z | 253,402,300,799 | Far future — NANOS exceeds INT64 | +| 5 | 0001-01-01T00:00:00Z | -62,135,596,800 | Far past — NANOS is below INT64 minimum |