Commit e04fafb
### 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 07e4d5a commit e04fafb
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 | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
595 | 600 | | |
596 | 601 | | |
597 | 602 | | |
| |||
659 | 664 | | |
660 | 665 | | |
661 | 666 | | |
662 | | - | |
663 | | - | |
| 667 | + | |
| 668 | + | |
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
| |||
1958 | 1963 | | |
1959 | 1964 | | |
1960 | 1965 | | |
1961 | | - | |
1962 | | - | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
1963 | 1971 | | |
1964 | 1972 | | |
1965 | | - | |
| 1973 | + | |
1966 | 1974 | | |
1967 | | - | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1968 | 1980 | | |
1969 | 1981 | | |
1970 | | - | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 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 | + | |
1971 | 2013 | | |
1972 | 2014 | | |
1973 | 2015 | | |
| |||
| 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