Commit 5f616db
### Rationale for this change
According to the [Variant specification](https://github.com/apache/parquet-format/blob/master/VariantEncoding.md), the specification_version field must be set to 1 to indicate Variant encoding version 1. Currently, this field defaults to 0, which violates the specification. Parquet readers that strictly enforce specification version validation will fail to read files containing Variant types.
<img width="624" height="185" alt="image" src="https://github.com/user-attachments/assets/b0f1deb9-0301-4b94-a472-17fd9cc0df5d" />
### What changes are included in this PR?
The change includes defaulting the specification version to 1.
### Are these changes tested?
The change is covered by unit test.
### Are there any user-facing changes?
The Parquet files produced the variant logical type annotation `VARIANT(1)`.
```
Schema:
message schema {
optional group V (VARIANT(1)) = 1 {
required binary metadata;
required binary value;
}
}
```
* GitHub Issue: #47838
Lead-authored-by: Aihua <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
1 parent f6e48b4 commit 5f616db
3 files changed
+92
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
1583 | | - | |
| 1583 | + | |
| 1584 | + | |
1584 | 1585 | | |
1585 | 1586 | | |
1586 | 1587 | | |
| |||
2353 | 2354 | | |
2354 | 2355 | | |
2355 | 2356 | | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
2356 | 2388 | | |
2357 | 2389 | | |
2358 | 2390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
600 | 605 | | |
601 | 606 | | |
602 | 607 | | |
| |||
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
667 | | - | |
668 | | - | |
| 672 | + | |
| 673 | + | |
669 | 674 | | |
670 | 675 | | |
671 | 676 | | |
| |||
1963 | 1968 | | |
1964 | 1969 | | |
1965 | 1970 | | |
1966 | | - | |
1967 | | - | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1968 | 1976 | | |
1969 | 1977 | | |
1970 | | - | |
| 1978 | + | |
1971 | 1979 | | |
1972 | | - | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
1973 | 1985 | | |
1974 | 1986 | | |
1975 | | - | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
1976 | 2018 | | |
1977 | 2019 | | |
1978 | 2020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | | - | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
498 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
499 | 506 | | |
500 | 507 | | |
501 | 508 | | |
| |||
0 commit comments