-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a File With Float 16
Selfeer edited this page Dec 13, 2024
·
1 revision
In Apache Parquet, the Float16
datatype represents a 16-bit floating-point number. It's a smaller and less precise version of the standard 32-bit floating-point number (Float32) or 64-bit floating-point number (Float64).
Key Points:
-
Size:
Float16
uses only 16 bits (2 bytes), making it more compact compared to Float32 or Float64. - Precision: It has less precision and a smaller range than Float32, so it's not ideal for very detailed or large numerical data.
-
Use Case:
Float16
is often used when memory and storage are critical, such as in machine learning models or graphics, where very high precision isn't necessary.
A Float16
can store numbers like 1.5 or 0.001, but it may lose precision for very large or very small numbers.
Example:
{
"name": "floatfield",
"schemaType": "required",
"physicalType": "FIXED_LEN_BYTE_ARRAY",
"length": 2,
"logicalType": "FLOAT16",
"data": [
-2,
-1,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
Note
Here length
is the specified length of the FIXED_LEN_BYTE_ARRAY
which is 16 for the given uuid
values.
Developed and maintained by the Altinity team.
- Home
- Parquet File Name
- Options of the File
- File Compression
- Writer Version
- Row and Page Size
- Bloom Filter
- Configure with Hadoop
- Integer Columns
- Unsigned Integer Columns
- UTF8 Columns
- Decimal Columns
- Date Columns
- Time and Timestamp Columns
- JSON and BSON Columns
- String Columns
- Enum Columns
- UUID Columns
- Float16 Column
- Array Columns
- Nested Array Columns
- Tuple Columns
- Nested Tuple Columns
- Schema Types
- Encodings
- File Encryption
- Extra Metadata Entries