File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
functions/src/scalars/comparisons Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ use crate::TypeID;
31
31
pub type ColumnRef = Arc < dyn Column > ;
32
32
pub trait Column : Send + Sync {
33
33
fn as_any ( & self ) -> & dyn Any ;
34
+
34
35
/// Type of data that column contains. It's an underlying physical type:
35
36
/// Int32 for Date, Int64 for Timestamp, so on.
36
37
fn data_type_id ( & self ) -> TypeID {
Original file line number Diff line number Diff line change @@ -143,3 +143,15 @@ impl Column for ConstColumn {
143
143
self . column . serialize ( vec, 0 ) ;
144
144
}
145
145
}
146
+
147
+ impl std:: fmt:: Debug for ConstColumn {
148
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
149
+ write ! (
150
+ f,
151
+ "ConstColumn \t typeid: {:?}\t len: {}\t data: [{:?}]" ,
152
+ self . data_type_id( ) ,
153
+ self . len( ) ,
154
+ self . column,
155
+ )
156
+ }
157
+ }
Original file line number Diff line number Diff line change @@ -555,8 +555,16 @@ impl<T: StringSearchImpl> ComparisonExpression for ComparisonStringImpl<T> {
555
555
T :: vector_const ( lhs, & r, self . op )
556
556
}
557
557
false => {
558
- let lhs: & StringColumn = Series :: check_get ( & lhs) ?;
559
- let rhs: & StringColumn = Series :: check_get ( & rhs) ?;
558
+ let full_lhs = lhs. convert_full_column ( ) ;
559
+ let lhs: & StringColumn = match Series :: check_get ( & lhs) {
560
+ Ok ( lhs) => lhs,
561
+ Err ( _) => Series :: check_get ( & full_lhs) ?,
562
+ } ;
563
+ let full_rhs = rhs. convert_full_column ( ) ;
564
+ let rhs: & StringColumn = match Series :: check_get ( & rhs) {
565
+ Ok ( lhs) => lhs,
566
+ Err ( _) => Series :: check_get ( & full_rhs) ?,
567
+ } ;
560
568
T :: vector_vector ( lhs, rhs, self . op )
561
569
}
562
570
} ;
You can’t perform that action at this time.
0 commit comments