github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/deprecated/parquet.go (about) 1 package deprecated 2 3 // DEPRECATED: Common types used by frameworks(e.g. hive, pig) using parquet. 4 // ConvertedType is superseded by LogicalType. This enum should not be extended. 5 // 6 // See LogicalTypes.md for conversion between ConvertedType and LogicalType. 7 type ConvertedType int32 8 9 const ( 10 // a BYTE_ARRAY actually contains UTF8 encoded chars 11 UTF8 ConvertedType = 0 12 13 // a map is converted as an optional field containing a repeated key/value pair 14 Map ConvertedType = 1 15 16 // a key/value pair is converted into a group of two fields 17 MapKeyValue ConvertedType = 2 18 19 // a list is converted into an optional field containing a repeated field for its 20 // values 21 List ConvertedType = 3 22 23 // an enum is converted into a binary field 24 Enum ConvertedType = 4 25 26 // A decimal value. 27 // 28 // This may be used to annotate binary or fixed primitive types. The 29 // underlying byte array stores the unscaled value encoded as two's 30 // complement using big-endian byte order (the most significant byte is the 31 // zeroth element). The value of the decimal is the value * 10^{-scale}. 32 // 33 // This must be accompanied by a (maximum) precision and a scale in the 34 // SchemaElement. The precision specifies the number of digits in the decimal 35 // and the scale stores the location of the decimal point. For example 1.23 36 // would have precision 3 (3 total digits) and scale 2 (the decimal point is 37 // 2 digits over). 38 Decimal ConvertedType = 5 39 40 // A Date 41 // 42 // Stored as days since Unix epoch, encoded as the INT32 physical type. 43 Date ConvertedType = 6 44 45 // A time 46 // 47 // The total number of milliseconds since midnight. The value is stored 48 // as an INT32 physical type. 49 TimeMillis ConvertedType = 7 50 51 // A time. 52 // 53 // The total number of microseconds since midnight. The value is stored as 54 // an INT64 physical type. 55 TimeMicros ConvertedType = 8 56 57 // A date/time combination 58 // 59 // Date and time recorded as milliseconds since the Unix epoch. Recorded as 60 // a physical type of INT64. 61 TimestampMillis ConvertedType = 9 62 63 // A date/time combination 64 // 65 // Date and time recorded as microseconds since the Unix epoch. The value is 66 // stored as an INT64 physical type. 67 TimestampMicros ConvertedType = 10 68 69 // An unsigned integer value. 70 // 71 // The number describes the maximum number of meaningful data bits in 72 // the stored value. 8, 16 and 32 bit values are stored using the 73 // INT32 physical type. 64 bit values are stored using the INT64 74 // physical type. 75 Uint8 ConvertedType = 11 76 Uint16 ConvertedType = 12 77 Uint32 ConvertedType = 13 78 Uint64 ConvertedType = 14 79 80 // A signed integer value. 81 // 82 // The number describes the maximum number of meaningful data bits in 83 // the stored value. 8, 16 and 32 bit values are stored using the 84 // INT32 physical type. 64 bit values are stored using the INT64 85 // physical type. 86 Int8 ConvertedType = 15 87 Int16 ConvertedType = 16 88 Int32 ConvertedType = 17 89 Int64 ConvertedType = 18 90 91 // An embedded JSON document 92 // 93 // A JSON document embedded within a single UTF8 column. 94 Json ConvertedType = 19 95 96 // An embedded BSON document 97 // 98 // A BSON document embedded within a single BINARY column. 99 Bson ConvertedType = 20 100 101 // An interval of time 102 // 103 // This type annotates data stored as a FIXED_LEN_BYTE_ARRAY of length 12 104 // This data is composed of three separate little endian unsigned 105 // integers. Each stores a component of a duration of time. The first 106 // integer identifies the number of months associated with the duration, 107 // the second identifies the number of days associated with the duration 108 // and the third identifies the number of milliseconds associated with 109 // the provided duration. This duration of time is independent of any 110 // particular timezone or date. 111 Interval ConvertedType = 21 112 )