Commit 686d085
authored
[Variant] ReadOnlyMetadataBuilder borrows its underlying VariantMetadata (#8502)
# Which issue does this PR close?
- Relates to #8336
# Rationale for this change
While pathfinding variant unshredding code, I noticed that there's a lot
of variant metadata cloning going on. It's a 32-byte object, so cloning
is not free. And it turns out that ~all read-only metadata builder usage
in the code base can work just as easily with a borrowed reference
because ultimately we're working with bytes borrowed from a binary view
that holds the metadata column.
# What changes are included in this PR?
Update the `ReadOnlyMetadataBuilder` to borrow the `VariantMetadata` it
uses, and update call sites accordingly.
# Are these changes tested?
Yes, the change affects several unit tests.
# Are there any user-facing changes?
Signature of `ReadOnlyMetadataBuilder::new` has changed.1 parent 883380b commit 686d085
File tree
3 files changed
+16
-15
lines changed- parquet-variant-compute/src
- parquet-variant/src
3 files changed
+16
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
| 797 | + | |
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | | - | |
| 317 | + | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
551 | | - | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
560 | | - | |
| 561 | + | |
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| |||
3357 | 3357 | | |
3358 | 3358 | | |
3359 | 3359 | | |
3360 | | - | |
| 3360 | + | |
3361 | 3361 | | |
3362 | 3362 | | |
3363 | 3363 | | |
| |||
3390 | 3390 | | |
3391 | 3391 | | |
3392 | 3392 | | |
3393 | | - | |
| 3393 | + | |
3394 | 3394 | | |
3395 | 3395 | | |
3396 | 3396 | | |
| |||
3438 | 3438 | | |
3439 | 3439 | | |
3440 | 3440 | | |
3441 | | - | |
| 3441 | + | |
3442 | 3442 | | |
3443 | 3443 | | |
3444 | 3444 | | |
| |||
3466 | 3466 | | |
3467 | 3467 | | |
3468 | 3468 | | |
3469 | | - | |
| 3469 | + | |
3470 | 3470 | | |
3471 | 3471 | | |
3472 | 3472 | | |
| |||
3530 | 3530 | | |
3531 | 3531 | | |
3532 | 3532 | | |
3533 | | - | |
| 3533 | + | |
3534 | 3534 | | |
3535 | 3535 | | |
3536 | 3536 | | |
| |||
3626 | 3626 | | |
3627 | 3627 | | |
3628 | 3628 | | |
3629 | | - | |
| 3629 | + | |
3630 | 3630 | | |
3631 | 3631 | | |
3632 | 3632 | | |
| |||
0 commit comments