This repository was archived by the owner on Jan 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
optd-datafusion-repr/src/properties Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -117,22 +117,19 @@ impl SchemaPropertyBuilder {
117
117
Schema { fields }
118
118
}
119
119
DfPredType :: LogOp ( _) => Schema {
120
- fields : vec ! [ Field :: placeholder( ) ; children. len( ) ] ,
120
+ fields : vec ! [ Field {
121
+ typ: ConstantType :: Bool ,
122
+ ..Field :: placeholder( )
123
+ } ] ,
124
+ } ,
125
+ DfPredType :: BinOp ( _) => Schema {
126
+ fields : vec ! [ Field :: placeholder( ) ] ,
121
127
} ,
122
- DfPredType :: BinOp ( _) => {
123
- let mut fields = children[ 0 ] . fields . clone ( ) ;
124
- fields. extend ( children[ 1 ] . fields . clone ( ) ) ;
125
- Schema { fields }
126
- }
127
128
DfPredType :: Cast => Schema {
128
- fields : children[ 0 ]
129
- . fields
130
- . iter ( )
131
- . map ( |field| Field {
132
- typ : children[ 1 ] . fields [ 0 ] . typ ,
133
- ..field. clone ( )
134
- } )
135
- . collect ( ) ,
129
+ fields : vec ! [ Field {
130
+ typ: children[ 1 ] . fields[ 0 ] . typ,
131
+ ..children[ 0 ] . fields[ 0 ] . clone( )
132
+ } ] ,
136
133
} ,
137
134
DfPredType :: DataType ( data_type) => Schema {
138
135
fields : vec ! [ Field {
@@ -148,7 +145,9 @@ impl SchemaPropertyBuilder {
148
145
// The real type should be the column type.
149
146
fields : vec ! [ Field :: placeholder( ) ] ,
150
147
} ,
151
- _ => Schema { fields : vec ! [ ] } ,
148
+ _ => Schema {
149
+ fields : vec ! [ Field :: placeholder( ) ] , // all predicates produce at least one column
150
+ } ,
152
151
}
153
152
}
154
153
}
You can’t perform that action at this time.
0 commit comments