File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed
physical-expr/src/expressions Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 18
18
//! IS NOT NULL expression
19
19
20
20
use crate :: PhysicalExpr ;
21
- use arrow:: datatypes:: FieldRef ;
22
21
use arrow:: {
23
22
datatypes:: { DataType , Schema } ,
24
23
record_batch:: RecordBatch ,
@@ -94,10 +93,6 @@ impl PhysicalExpr for IsNotNullExpr {
94
93
}
95
94
}
96
95
97
- fn return_field ( & self , input_schema : & Schema ) -> Result < FieldRef > {
98
- self . arg . return_field ( input_schema)
99
- }
100
-
101
96
fn children ( & self ) -> Vec < & Arc < dyn PhysicalExpr > > {
102
97
vec ! [ & self . arg]
103
98
}
Original file line number Diff line number Diff line change 18
18
//! IS NULL expression
19
19
20
20
use crate :: PhysicalExpr ;
21
- use arrow:: datatypes:: FieldRef ;
22
21
use arrow:: {
23
22
datatypes:: { DataType , Schema } ,
24
23
record_batch:: RecordBatch ,
@@ -93,10 +92,6 @@ impl PhysicalExpr for IsNullExpr {
93
92
}
94
93
}
95
94
96
- fn return_field ( & self , input_schema : & Schema ) -> Result < FieldRef > {
97
- self . arg . return_field ( input_schema)
98
- }
99
-
100
95
fn children ( & self ) -> Vec < & Arc < dyn PhysicalExpr > > {
101
96
vec ! [ & self . arg]
102
97
}
Original file line number Diff line number Diff line change @@ -2131,3 +2131,26 @@ query T
2131
2131
select E'foo\t\tbar';
2132
2132
----
2133
2133
foo bar
2134
+
2135
+ statement ok
2136
+ create table t (a float) as values (1), (null), (3);
2137
+
2138
+ # https://github.com/apache/datafusion/issues/17055
2139
+ # is not null did not correctly infer as boolean in udf argument position
2140
+ query B
2141
+ select greatest(a is not null, false) from t;
2142
+ ----
2143
+ true
2144
+ false
2145
+ true
2146
+
2147
+ # same for is null
2148
+ query B
2149
+ select greatest(a is null, false) from t;
2150
+ ----
2151
+ false
2152
+ true
2153
+ false
2154
+
2155
+ statement ok
2156
+ drop table t;
You can’t perform that action at this time.
0 commit comments