Repository navigation
Commit 4326f45
committed
[fix](fe) Write the elements of an array literal with their own boundaries
### What problem does this solve?
Problem Summary: the text of a literal was the text of its value, and the value of an array is a list
whose text separates its elements with an apostrophe a value may carry: the two-element array
`['a','b']` and the one-element array `['a', 'b']` (value `a', 'b`) rendered one
`lit([a', 'b]:ARRAY<TEXT>)`. A filter over `ARRAY_OVERLAP(t.arr, <the literal>)` keeps a different
number of rows for the two arrays, so an exact pin of one applied to the other on an unchanged scan
baseline.
The elements of a composite literal are literals themselves and are now rendered by the same rule as
every literal of a canonical (`lit(<value>:<type>)`, separated by a comma), so an apostrophe inside an
element cannot be taken for the boundary between two elements. A scalar literal, and therefore every
existing key, is unchanged.
### Release note
Two plans which differ only by the elements of an array literal no longer share an hbo statistics entry.
### Check List (For Author)
- Test: Unit Test
- Two corpus cases pin the two arrays above and a test asserts their exact keys differ; the
regenerated file only gained those cases and its count line - no existing key moved - and 194
cases of the stats package plus the HBO command suite pass.
- Behavior changed: Yes - the exact key of a plan with an array literal moved once.
- Does this need documentation: No1 parent fdce05c commit 4326f45
3 files changed
Lines changed: 86 additions & 1 deletion
File tree
- fe/fe-core/src
- main/java/org/apache/doris/nereids/stats
- test
- java/org/apache/doris/nereids/stats
- resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
2540 | 2541 | | |
2541 | 2542 | | |
2542 | 2543 | | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
2543 | 2561 | | |
2544 | 2562 | | |
2545 | 2563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
449 | 451 | | |
450 | 452 | | |
451 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
452 | 466 | | |
453 | 467 | | |
454 | 468 | | |
| |||
1225 | 1239 | | |
1226 | 1240 | | |
1227 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1228 | 1248 | | |
1229 | 1249 | | |
1230 | 1250 | | |
| |||
1673 | 1693 | | |
1674 | 1694 | | |
1675 | 1695 | | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1676 | 1719 | | |
1677 | 1720 | | |
1678 | 1721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
474 | 474 | | |
475 | 475 | | |
476 | 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 | + | |
477 | 501 | | |
478 | 502 | | |
479 | 503 | | |
| |||
0 commit comments