emkornfield commented on code in PR #123: URL: https://github.com/apache/parquet-testing/pull/123#discussion_r3819081572
########## data/flba12_timestamp.md: ########## @@ -0,0 +1,48 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +# `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 | Review Comment: I forget if parquet ever formalized this as the expected calendar being proleptic gregorian. Either way we should probably call this out. Would it also make sense to give the epoch values or seconds like you did for value number 3? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
