File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,8 @@ impl StreamTablePart {
78
78
} ) )
79
79
}
80
80
81
- pub fn from_part ( info : & PartInfoPtr ) -> Result < & StreamTablePart > {
82
- info. as_any ( )
83
- . downcast_ref :: < StreamTablePart > ( )
84
- . ok_or ( ErrorCode :: Internal (
85
- "Cannot downcast from PartInfo to StreamTablePart." ,
86
- ) )
81
+ pub fn from_part ( info : & PartInfoPtr ) -> Option < & StreamTablePart > {
82
+ info. as_any ( ) . downcast_ref :: < StreamTablePart > ( )
87
83
}
88
84
89
85
pub fn inner ( & self ) -> Partitions {
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ impl ToReadDataSourcePlan for dyn Table {
113
113
let mut base_block_ids = None ;
114
114
if parts. partitions . len ( ) == 1 {
115
115
let part = parts. partitions [ 0 ] . clone ( ) ;
116
- if let Ok ( part) = StreamTablePart :: from_part ( & part) {
116
+ if let Some ( part) = StreamTablePart :: from_part ( & part) {
117
117
parts = part. inner ( ) ;
118
118
base_block_ids = Some ( part. base_block_ids ( ) ) ;
119
119
}
You can’t perform that action at this time.
0 commit comments