Commit 675881d
authored
fix: insert placeholder type inference showing wrong type when there is function wrapped placeholder (unknown type) (#20744)
## Which issue does this PR close?
- Closes #20544.
## Rationale for this change
Please see #20544 for details. I wanted to open a PR to discuss if API
change is ok for this fix
## What changes are included in this PR?
This PR changes FieldRef to Option<FieldRef> for placeholders and adds
test case for this.
## Are these changes tested?
Yes. Existing tests and added test case for the reproduced error
## Are there any user-facing changes?
Yes. this changes `prepare_param_data_types` field and its callers to
use Option wrapped FieldRef instead of FieldRef.1 parent 935382f commit 675881d
File tree
4 files changed
+47
-17
lines changed- datafusion/sql
- src
- expr
- tests/cases
4 files changed
+47
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
793 | | - | |
794 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
795 | 797 | | |
796 | 798 | | |
797 | 799 | | |
| |||
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
811 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
812 | 816 | | |
813 | 817 | | |
814 | 818 | | |
| |||
1341 | 1345 | | |
1342 | 1346 | | |
1343 | 1347 | | |
1344 | | - | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1345 | 1355 | | |
1346 | 1356 | | |
1347 | 1357 | | |
| |||
2340 | 2350 | | |
2341 | 2351 | | |
2342 | 2352 | | |
2343 | | - | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
2344 | 2359 | | |
2345 | 2360 | | |
2346 | 2361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1044 | 1060 | | |
1045 | 1061 | | |
1046 | 1062 | | |
| |||
0 commit comments