@@ -20,7 +20,6 @@ use risingwave_connector::source::iceberg::{
20
20
extract_bucket_and_file_name, new_s3_operator, read_parquet_file, FileScanBackend ,
21
21
} ;
22
22
use risingwave_pb:: batch_plan:: file_scan_node;
23
- use risingwave_pb:: batch_plan:: file_scan_node:: StorageType ;
24
23
use risingwave_pb:: batch_plan:: plan_node:: NodeBody ;
25
24
26
25
use crate :: error:: BatchError ;
@@ -38,6 +37,7 @@ pub struct S3FileScanExecutor {
38
37
s3_region : String ,
39
38
s3_access_key : String ,
40
39
s3_secret_key : String ,
40
+ s3_endpoint : String ,
41
41
batch_size : usize ,
42
42
schema : Schema ,
43
43
identity : String ,
@@ -67,13 +67,15 @@ impl S3FileScanExecutor {
67
67
batch_size : usize ,
68
68
schema : Schema ,
69
69
identity : String ,
70
+ s3_endpoint : String ,
70
71
) -> Self {
71
72
Self {
72
73
file_format,
73
74
file_location,
74
75
s3_region,
75
76
s3_access_key,
76
77
s3_secret_key,
78
+ s3_endpoint,
77
79
batch_size,
78
80
schema,
79
81
identity,
@@ -90,6 +92,7 @@ impl S3FileScanExecutor {
90
92
self . s3_access_key . clone ( ) ,
91
93
self . s3_secret_key . clone ( ) ,
92
94
bucket. clone ( ) ,
95
+ self . s3_endpoint . clone ( ) ,
93
96
) ?;
94
97
let chunk_stream =
95
98
read_parquet_file ( op, file_name, None , None , self . batch_size , 0 ) . await ?;
@@ -115,8 +118,6 @@ impl BoxedExecutorBuilder for FileScanExecutorBuilder {
115
118
NodeBody :: FileScan
116
119
) ?;
117
120
118
- assert_eq ! ( file_scan_node. storage_type, StorageType :: S3 as i32 ) ;
119
-
120
121
Ok ( Box :: new ( S3FileScanExecutor :: new (
121
122
match file_scan_node:: FileFormat :: try_from ( file_scan_node. file_format ) . unwrap ( ) {
122
123
file_scan_node:: FileFormat :: Parquet => FileFormat :: Parquet ,
@@ -129,6 +130,7 @@ impl BoxedExecutorBuilder for FileScanExecutorBuilder {
129
130
source. context ( ) . get_config ( ) . developer . chunk_size ,
130
131
Schema :: from_iter ( file_scan_node. columns . iter ( ) . map ( Field :: from) ) ,
131
132
source. plan_node ( ) . get_identity ( ) . clone ( ) ,
133
+ file_scan_node. s3_endpoint . clone ( ) ,
132
134
) ) )
133
135
}
134
136
}
0 commit comments