Commit bbd78f9
committed
confluent: resolve named-type references in lame Avro unions too
The lame-union path -- raw_unions: false on schema_registry_decode, which
is the documented default -- carried the same bug as the raw path: string
branches like "Fee" in ["null", "Fee"] went through ecsAvroTypeToCommon
directly and collapsed to schema.Any, even when "Fee" was a previously-
defined record. The tagged-JSON envelope around each branch then wrapped
an Any inner, producing a structureless metadata tree.
Reroute the lame hydrator through the same ecsAvroResolveTypeRef helper
the raw path now uses, then re-apply the lame-specific wrapping
(tagged-Object envelope, type-name preserved as Common.Name to match the
wire-form tag). The non-Avro behavior of the lame envelope is unchanged;
only the inner Common is now correctly populated for name references.
This closes the same CON-468 bug class for the default-config path that
commit 4531c51 closed for the raw-unions path.1 parent 67ded3c commit bbd78f9
2 files changed
Lines changed: 57 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
550 | 545 | | |
551 | 546 | | |
552 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
470 | 519 | | |
471 | 520 | | |
472 | 521 | | |
| |||
0 commit comments