databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: location path as prefix instead of dir

Open youngsofun opened this issue 1 year ago • 2 comments

Summary

for example:

root@localhost:8000/default> create stage s3 url = 'fs:///tmp';
error: APIError: ResponseError with 1005: URL's path must ends with `/` when do CREATE STAGE

youngsofun avatar Jan 09 '24 11:01 youngsofun

@Xuanwo

https://github.com/datafuselabs/databend/blob/f5b31e2e28e4db0efb95147ad8194a28323cdbab/src/query/sql/src/planner/binder/location.rs#L388C1-L394C83

    // Path endswith `/` means it's a directory, otherwise it's a file.
    // If the path is a directory, we will use this path as root.
    // If the path is a file, we will use `/` as root (which is the default value)

can we allow any path(prefix) to be root now? does fs backend support prefix list by default too?

youngsofun avatar Jan 09 '24 11:01 youngsofun

can we allow any path(prefix) to be root now?

Yes. root of opendal operator must be dir but we can use any path(prefix) in the list operation.

does fs backend support prefix prefix by default too?

Yes

Xuanwo avatar Jan 09 '24 13:01 Xuanwo

done https://github.com/datafuselabs/databend/pull/14420

youngsofun avatar May 30 '24 06:05 youngsofun