Commit 21cf60a
authored
Add Null Type Coercions for Placeholders (#20543)
## Which issue does this PR close?
At least this one: #19471 but
might be others
## Rationale for this change
This fixes a problem we have where placeholder types are `Null`, and we
need to add explicit type casts in the query.
I.e, you can't use placeholders for `date_bin` functions:
```sql
select date_bin($resolution, timestamp)
```
This works though (currently):
```sql
select date_bin($resolution::interval, timestamp)
```
## What changes are included in this PR?
Adds some extra type coercions
## Are these changes tested?
Yes, new tests added
## Are there any user-facing changes?
Not really?1 parent 1efcbf5 commit 21cf60a
File tree
3 files changed
+45
-2
lines changed- datafusion
- expr/src/type_coercion
- sqllogictest/test_files
- datetime
3 files changed
+45
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
931 | 938 | | |
932 | 939 | | |
933 | 940 | | |
| |||
937 | 944 | | |
938 | 945 | | |
939 | 946 | | |
940 | | - | |
| 947 | + | |
941 | 948 | | |
942 | 949 | | |
943 | 950 | | |
| |||
956 | 963 | | |
957 | 964 | | |
958 | 965 | | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
959 | 996 | | |
960 | 997 | | |
961 | 998 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5385 | 5385 | | |
5386 | 5386 | | |
5387 | 5387 | | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
| 5393 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
0 commit comments