Commit 558bdb5
committed
Support splitting compressed chunks
Add support for splitting compressed chunks when calling
split_chunk(). Only 2-way splits are supported, as before.
When splitting a compressed chunk, the same rewrite-approach is taken
as when splitting a non-compressed chunk. The main difference is that
the internal compressed relation is split in a separate step, similar
to the non-compressed relation. One complication is that the split
might end up in the middle of a compressed segment, in which case the
segment needs to be split as well. This is done by decompressing the
segment in memory and creating two new segments that get written to
the resulting split relations. Since the non-compressed and compressed
relations are split separetely, the non-compressed data remains
non-compressed after the split.
Special care is also taken to handle compression stats. In particular,
instead of computing new stats, the existing stats are divided across
the result relations depending on the amount of data received. This
means that the sum of the stats after a split is the same as before
the split. Computing new stats is not feasible given that the current
approach requires knowing the pre-compressed relation sizes, which is
not possible without first decompressing everything.1 parent 27fd9aa commit 558bdb5
File tree
9 files changed
+1810
-395
lines changed- .unreleased
- src
- tsl
- src
- compression
- test
- expected
- sql
9 files changed
+1810
-395
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
718 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
719 | 726 | | |
720 | 727 | | |
721 | 728 | | |
| |||
731 | 738 | | |
732 | 739 | | |
733 | 740 | | |
734 | | - | |
735 | | - | |
736 | | - | |
| 741 | + | |
737 | 742 | | |
738 | 743 | | |
739 | 744 | | |
| |||
950 | 955 | | |
951 | 956 | | |
952 | 957 | | |
953 | | - | |
| 958 | + | |
954 | 959 | | |
955 | 960 | | |
956 | 961 | | |
957 | 962 | | |
958 | | - | |
| 963 | + | |
959 | 964 | | |
960 | 965 | | |
961 | 966 | | |
| |||
968 | 973 | | |
969 | 974 | | |
970 | 975 | | |
971 | | - | |
| 976 | + | |
| 977 | + | |
972 | 978 | | |
973 | 979 | | |
974 | 980 | | |
| |||
977 | 983 | | |
978 | 984 | | |
979 | 985 | | |
980 | | - | |
| 986 | + | |
981 | 987 | | |
982 | 988 | | |
983 | 989 | | |
984 | 990 | | |
985 | 991 | | |
986 | 992 | | |
987 | 993 | | |
988 | | - | |
| 994 | + | |
989 | 995 | | |
990 | 996 | | |
991 | 997 | | |
| |||
1033 | 1039 | | |
1034 | 1040 | | |
1035 | 1041 | | |
| 1042 | + | |
1036 | 1043 | | |
1037 | 1044 | | |
1038 | 1045 | | |
| |||
1083 | 1090 | | |
1084 | 1091 | | |
1085 | 1092 | | |
1086 | | - | |
| 1093 | + | |
| 1094 | + | |
1087 | 1095 | | |
1088 | 1096 | | |
1089 | 1097 | | |
| |||
1172 | 1180 | | |
1173 | 1181 | | |
1174 | 1182 | | |
1175 | | - | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1176 | 1189 | | |
1177 | 1190 | | |
1178 | 1191 | | |
1179 | 1192 | | |
1180 | | - | |
| 1193 | + | |
| 1194 | + | |
1181 | 1195 | | |
1182 | 1196 | | |
1183 | 1197 | | |
| |||
1211 | 1225 | | |
1212 | 1226 | | |
1213 | 1227 | | |
1214 | | - | |
| 1228 | + | |
| 1229 | + | |
1215 | 1230 | | |
1216 | | - | |
1217 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1218 | 1237 | | |
1219 | 1238 | | |
1220 | 1239 | | |
| |||
1812 | 1831 | | |
1813 | 1832 | | |
1814 | 1833 | | |
1815 | | - | |
| 1834 | + | |
1816 | 1835 | | |
1817 | 1836 | | |
1818 | 1837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
0 commit comments