Commit 40300ca
authored
perf: Speed up Parquet file writing (10%, back to speed of 56) (#8786)
# Which issue does this PR close?
- Partial fix for #8783.
# Rationale for this change
An appreciable slowdown in Parquet writing was noticed. At least part of
the slowdown seems to stem from changes to `basic::LogicalType` which
caused cloning the enum to take make longer than previously.
# What changes are included in this PR?
This adds a new `logical_type_ref` call to `BasicTypeInfo` and
`ColumnDescriptor`. Unlike the existing `logical_type` which returns a
cloned `Option<LogicalType>`, the new methods return
`Option<&LogicalType>`. This new function is used in place of
`logical_type` internally.
# Are these changes tested?
Should be covered by existing tests.
# Are there any user-facing changes?
No.
A further optimization would be to change `ColumnOrder::get_sort_order`
to take an `Option<&LogicalType>`, but that is a breaking API change.1 parent 0430664 commit 40300ca
File tree
5 files changed
+26
-10
lines changed- parquet/src
- column/writer
- geospatial
- record
- schema
5 files changed
+26
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
872 | | - | |
| 871 | + | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
| 1388 | + | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| |||
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
1424 | | - | |
| 1424 | + | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
1441 | | - | |
| 1441 | + | |
1442 | 1442 | | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
1446 | 1446 | | |
1447 | | - | |
| 1447 | + | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
| 759 | + | |
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
710 | 713 | | |
711 | 714 | | |
712 | 715 | | |
713 | 716 | | |
714 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
715 | 723 | | |
716 | 724 | | |
717 | 725 | | |
| |||
908 | 916 | | |
909 | 917 | | |
910 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
911 | 922 | | |
912 | 923 | | |
913 | 924 | | |
914 | 925 | | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
915 | 931 | | |
916 | 932 | | |
917 | 933 | | |
| |||
0 commit comments