Skip to content

Commit 84d525a

Browse files
authored
Correct primitive_null.value (#86)
1 parent e7b28dd commit 84d525a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

variant/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The files in this directory were initially generated by running the [`regen.py`]
4949
script which used Apache Spark to generate the files. The files have been subsequently modified
5050
when necessary to ensure that they conform to the Parquet spec.
5151

52-
### Modification 1: Created metadata for `primitive_null` as a single byte (`0x01`)
52+
### Modification 1: Created metadata and value for `primitive_null` as a single byte (`0x01`)
5353

5454
Per <https://github.com/apache/parquet-testing/issues/81>, Spark did not generate
5555
any metadata for `null` and left `primitive_null.metadata` empty.
@@ -62,5 +62,12 @@ The metadata for `primitive_null` should be the same 3 bytes as other primitive
6262
cp primitive_int8.metadata primitive_null.metadata
6363
```
6464

65+
The value for a primitive should be a `value_header` and no `value_data`,
66+
resulting in a single `0` byte:
67+
68+
```shell
69+
echo -n 'a' | tr a '\0' > primitive_null.value
70+
```
71+
6572
[Variant]: https://github.com/apache/parquet-format/blob/master/VariantEncoding.md
6673
[primitive types listed in the spec]: https://github.com/apache/parquet-format/blob/master/VariantEncoding.md#value-data-for-primitive-type-basic_type0

variant/primitive_null.value

1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)