@@ -5,46 +5,59 @@ People can easily get started with creating and using Lance tables directly on t
55local or remote storage system with a Lance directory namespace.
66
77A directory namespace maps to a directory on storage, we call such directory a ** namespace directory** .
8- A Lance table corresponds to a subdirectory in the namespace directory.
9- We call such a subdirectories ** table directory** .
8+ A Lance table corresponds to a subdirectory in the namespace directory that has the format ` <table_name>.lance ` .
9+ We call such a subdirectory ** table directory** .
1010Consider the following example namespace directory layout:
1111
1212```
1313.
1414└── /my/dir1/
15- ├── table1/
15+ ├── table1.lance /
1616 │ ├── data/
1717 │ │ ├── 0aa36d91-8293-406b-958c-faf9e7547938.lance
1818 │ │ └── ed7af55d-b064-4442-bcb5-47b524e98d0e.lance
1919 │ ├── _versions/
2020 │ │ └── 9223372036854775707.manifest
21- │ ├── _indices/
22- │ │ └── 85814508-ed9a-41f2-b939-2050bb7a0ed5-fts/
23- │ │ └── index.idx
24- │ └── _deletions/
25- │ └── 75c69434-cde5-4c80-9fe1-e79a6d952fbf.bin
26- ├── table2
27- └── table3
21+ │ └── _indices/
22+ │ └── 85814508-ed9a-41f2-b939-2050bb7a0ed5-fts/
23+ │ └── index.idx
24+ ├── table2.lance
25+ └── table3.lance
2826```
2927
3028This describes a Lance directory namespace with the namespace directory at ` /my/dir1/ ` .
3129It contains tables ` table1 ` , ` table2 ` , ` table3 ` sitting at table directories
32- ` /my/dirs/table1 ` , ` /my/dirs/table2 ` , ` /my/dirs/table3 ` respectively.
30+ ` /my/dirs/table1.lance ` , ` /my/dirs/table2.lance ` , ` /my/dirs/table3.lance ` respectively.
3331
34- ## Directory Path
32+ ## Configuration
3533
36- There are 3 ways to specify a directory path:
34+ The Lance directory namespace accepts the following configuration properties:
35+
36+ | Property | Required | Description | Default | Example |
37+ | ---------------| ----------| -------------------------------------------------------------| ---------------------------| ---------------------------------|
38+ | ` root ` | No | The root directory of the namespace where tables are stored | Current working directory | ` /my/dir ` , ` s3://bucket/prefix ` |
39+ | ` storage.* ` | No | Storage-specific configuration options | | ` storage.region=us-west-2 ` |
40+
41+ ### Root Path
42+
43+ There are 3 ways to specify a root path:
3744
38451 . ** URI** : a URI that follows the [ RFC 3986 specification] ( https://datatracker.ietf.org/doc/html/rfc3986 ) , e.g. ` s3://mu-bucket/prefix ` .
39462 . ** Absolute POSIX storage path** : an absolute file path in a POSIX standard storage, e.g. ` /my/dir ` .
40473 . ** Relative POSIX storage path** : a relative file path in a POSIX standard storage, e.g. ` my/dir2 ` , ` ./my/dir3 ` .
41- The absolute path of the directory should be based on the current directory of the running process.
48+ The absolute path of the root should be derived from the current working directory.
49+
50+ ### Storage Options
51+
52+ Properties with the ` storage. ` prefix are passed directly to the underlying OpenDAL storage system
53+ after removing the prefix. For example, ` storage.region ` becomes ` region ` when passed to the storage layer.
54+ Please visit [ Apache OpenDAL] ( https://opendal.apache.org ) for more details.
4255
4356## Table Existence
4457
45- A table exists in a Lance directory namespace if a table directory of the specific name exists.
46- This is true even if the directory is empty or the contents in the directory does not follow the Lance table format spec .
47- For such cases, an operation that lists all tables in the directory should show the specific table,
48- and an operation that checks if a table exists should return true.
49- However, an operation that loads the Lance table metadata should fail with error
50- indicating the content in the folder is not compliant with the Lance table format spec .
58+ A table exists in a Lance directory namespace if a table directory of the specific name exists
59+ ** and ** contains a non- empty ` _versions ` subdirectory .
60+
61+ When checking if a specific table exists or deciding if a table should be listed,
62+ the operation must list objects with the ` _versions/ ` prefix and checks if any objects exist.
63+ If the directory exists but there is no file in the directory, it should be treated as non-existent .
0 commit comments