File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/query/service/src/interpreters Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ pub async fn list_files_from_dal(
153
153
) -> Result < Vec < StageFile > > {
154
154
let rename_me_qry_ctx: Arc < dyn TableContext > = ctx. clone ( ) ;
155
155
let op = StageSourceHelper :: get_op ( & rename_me_qry_ctx, stage) . await ?;
156
+ let prefix = stage. get_prefix ( ) ;
156
157
let mut files = Vec :: new ( ) ;
157
158
158
159
// - If the path itself is a dir, return directly.
@@ -177,7 +178,7 @@ pub async fn list_files_from_dal(
177
178
let mut ds = op. batch ( ) . walk_top_down ( & dir) ?;
178
179
while let Some ( de) = ds. try_next ( ) . await ? {
179
180
if de. mode ( ) . is_file ( ) {
180
- let path = de. name ( ) . to_string ( ) ;
181
+ let path = de. path ( ) . trim_start_matches ( & prefix ) . to_string ( ) ;
181
182
let meta = de. metadata ( ) . await ?;
182
183
files. push ( ( path, meta) ) ;
183
184
}
You can’t perform that action at this time.
0 commit comments