mirror of
https://github.com/lancedb/lancedb.git
synced 2026-09-04 12:38:38 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 381e7cb9a6 | |||
| a11d28eb33 | |||
| 1078983993 | |||
| 8500b16eca | |||
| 57e7282342 |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.24.0"
|
current_version = "0.24.1"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
Generated
+3
-3
@@ -4971,7 +4971,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb"
|
name = "lancedb"
|
||||||
version = "0.24.0"
|
version = "0.24.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -5050,7 +5050,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb-nodejs"
|
name = "lancedb-nodejs"
|
||||||
version = "0.24.0"
|
version = "0.24.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-ipc",
|
"arrow-ipc",
|
||||||
@@ -5070,7 +5070,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb-python"
|
name = "lancedb-python"
|
||||||
version = "0.27.0"
|
version = "0.27.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Add the following dependency to your `pom.xml`:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-core</artifactId>
|
<artifactId>lancedb-core</artifactId>
|
||||||
<version>0.24.0</version>
|
<version>0.24.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-parent</artifactId>
|
<artifactId>lancedb-parent</artifactId>
|
||||||
<version>0.24.0-final.0</version>
|
<version>0.24.1-final.0</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-parent</artifactId>
|
<artifactId>lancedb-parent</artifactId>
|
||||||
<version>0.24.0-final.0</version>
|
<version>0.24.1-final.0</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
<description>LanceDB Java SDK Parent POM</description>
|
<description>LanceDB Java SDK Parent POM</description>
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lancedb-nodejs"
|
name = "lancedb-nodejs"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
version = "0.24.0"
|
version = "0.24.1"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
description.workspace = true
|
description.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
|
|||||||
@@ -538,6 +538,35 @@ export abstract class Table {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract stats(): Promise<TableStatistics>;
|
abstract stats(): Promise<TableStatistics>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the initial storage options that were passed in when opening this table.
|
||||||
|
*
|
||||||
|
* For dynamically refreshed options (e.g., credential vending), use
|
||||||
|
* {@link Table.latestStorageOptions}.
|
||||||
|
*
|
||||||
|
* Warning: This is an internal API and the return value is subject to change.
|
||||||
|
*
|
||||||
|
* @returns The storage options, or undefined if no storage options were configured.
|
||||||
|
*/
|
||||||
|
abstract initialStorageOptions(): Promise<
|
||||||
|
Record<string, string> | null | undefined
|
||||||
|
>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the latest storage options, refreshing from provider if configured.
|
||||||
|
*
|
||||||
|
* This method is useful for credential vending scenarios where storage options
|
||||||
|
* may be refreshed dynamically. If no dynamic provider is configured, this
|
||||||
|
* returns the initial static options.
|
||||||
|
*
|
||||||
|
* Warning: This is an internal API and the return value is subject to change.
|
||||||
|
*
|
||||||
|
* @returns The storage options, or undefined if no storage options were configured.
|
||||||
|
*/
|
||||||
|
abstract latestStorageOptions(): Promise<
|
||||||
|
Record<string, string> | null | undefined
|
||||||
|
>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LocalTable extends Table {
|
export class LocalTable extends Table {
|
||||||
@@ -858,6 +887,18 @@ export class LocalTable extends Table {
|
|||||||
return await this.inner.stats();
|
return await this.inner.stats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async initialStorageOptions(): Promise<
|
||||||
|
Record<string, string> | null | undefined
|
||||||
|
> {
|
||||||
|
return await this.inner.initialStorageOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
async latestStorageOptions(): Promise<
|
||||||
|
Record<string, string> | null | undefined
|
||||||
|
> {
|
||||||
|
return await this.inner.latestStorageOptions();
|
||||||
|
}
|
||||||
|
|
||||||
mergeInsert(on: string | string[]): MergeInsertBuilder {
|
mergeInsert(on: string | string[]): MergeInsertBuilder {
|
||||||
on = Array.isArray(on) ? on : [on];
|
on = Array.isArray(on) ? on : [on];
|
||||||
return new MergeInsertBuilder(this.inner.mergeInsert(on), this.schema());
|
return new MergeInsertBuilder(this.inner.mergeInsert(on), this.schema());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-darwin-arm64",
|
"name": "@lancedb/lancedb-darwin-arm64",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["darwin"],
|
"os": ["darwin"],
|
||||||
"cpu": ["arm64"],
|
"cpu": ["arm64"],
|
||||||
"main": "lancedb.darwin-arm64.node",
|
"main": "lancedb.darwin-arm64.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-darwin-x64",
|
"name": "@lancedb/lancedb-darwin-x64",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["darwin"],
|
"os": ["darwin"],
|
||||||
"cpu": ["x64"],
|
"cpu": ["x64"],
|
||||||
"main": "lancedb.darwin-x64.node",
|
"main": "lancedb.darwin-x64.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-linux-arm64-gnu",
|
"name": "@lancedb/lancedb-linux-arm64-gnu",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["linux"],
|
"os": ["linux"],
|
||||||
"cpu": ["arm64"],
|
"cpu": ["arm64"],
|
||||||
"main": "lancedb.linux-arm64-gnu.node",
|
"main": "lancedb.linux-arm64-gnu.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-linux-arm64-musl",
|
"name": "@lancedb/lancedb-linux-arm64-musl",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["linux"],
|
"os": ["linux"],
|
||||||
"cpu": ["arm64"],
|
"cpu": ["arm64"],
|
||||||
"main": "lancedb.linux-arm64-musl.node",
|
"main": "lancedb.linux-arm64-musl.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-linux-x64-gnu",
|
"name": "@lancedb/lancedb-linux-x64-gnu",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["linux"],
|
"os": ["linux"],
|
||||||
"cpu": ["x64"],
|
"cpu": ["x64"],
|
||||||
"main": "lancedb.linux-x64-gnu.node",
|
"main": "lancedb.linux-x64-gnu.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-linux-x64-musl",
|
"name": "@lancedb/lancedb-linux-x64-musl",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["linux"],
|
"os": ["linux"],
|
||||||
"cpu": ["x64"],
|
"cpu": ["x64"],
|
||||||
"main": "lancedb.linux-x64-musl.node",
|
"main": "lancedb.linux-x64-musl.node",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-win32-arm64-msvc",
|
"name": "@lancedb/lancedb-win32-arm64-msvc",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb-win32-x64-msvc",
|
"name": "@lancedb/lancedb-win32-x64-msvc",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"os": ["win32"],
|
"os": ["win32"],
|
||||||
"cpu": ["x64"],
|
"cpu": ["x64"],
|
||||||
"main": "lancedb.win32-x64-msvc.node",
|
"main": "lancedb.win32-x64-msvc.node",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb",
|
"name": "@lancedb/lancedb",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lancedb/lancedb",
|
"name": "@lancedb/lancedb",
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64",
|
"x64",
|
||||||
"arm64"
|
"arm64"
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"ann"
|
"ann"
|
||||||
],
|
],
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "0.24.0",
|
"version": "0.24.1",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
|
|||||||
@@ -166,6 +166,19 @@ impl Table {
|
|||||||
Ok(stats.into())
|
Ok(stats.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[napi(catch_unwind)]
|
||||||
|
pub async fn initial_storage_options(&self) -> napi::Result<Option<HashMap<String, String>>> {
|
||||||
|
Ok(self.inner_ref()?.initial_storage_options().await)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[napi(catch_unwind)]
|
||||||
|
pub async fn latest_storage_options(&self) -> napi::Result<Option<HashMap<String, String>>> {
|
||||||
|
self.inner_ref()?
|
||||||
|
.latest_storage_options()
|
||||||
|
.await
|
||||||
|
.default_error()
|
||||||
|
}
|
||||||
|
|
||||||
#[napi(catch_unwind)]
|
#[napi(catch_unwind)]
|
||||||
pub async fn update(
|
pub async fn update(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ class Table:
|
|||||||
delete_unverified: Optional[bool] = None,
|
delete_unverified: Optional[bool] = None,
|
||||||
) -> OptimizeStats: ...
|
) -> OptimizeStats: ...
|
||||||
async def uri(self) -> str: ...
|
async def uri(self) -> str: ...
|
||||||
|
async def initial_storage_options(self) -> Optional[Dict[str, str]]: ...
|
||||||
|
async def latest_storage_options(self) -> Optional[Dict[str, str]]: ...
|
||||||
@property
|
@property
|
||||||
def tags(self) -> Tags: ...
|
def tags(self) -> Tags: ...
|
||||||
def query(self) -> Query: ...
|
def query(self) -> Query: ...
|
||||||
|
|||||||
@@ -2222,6 +2222,37 @@ class LanceTable(Table):
|
|||||||
def uri(self) -> str:
|
def uri(self) -> str:
|
||||||
return LOOP.run(self._table.uri())
|
return LOOP.run(self._table.uri())
|
||||||
|
|
||||||
|
def initial_storage_options(self) -> Optional[Dict[str, str]]:
|
||||||
|
"""Get the initial storage options that were passed in when opening this table.
|
||||||
|
|
||||||
|
For dynamically refreshed options (e.g., credential vending), use
|
||||||
|
:meth:`latest_storage_options`.
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Optional[Dict[str, str]]
|
||||||
|
The storage options, or None if no storage options were configured.
|
||||||
|
"""
|
||||||
|
return LOOP.run(self._table.initial_storage_options())
|
||||||
|
|
||||||
|
def latest_storage_options(self) -> Optional[Dict[str, str]]:
|
||||||
|
"""Get the latest storage options, refreshing from provider if configured.
|
||||||
|
|
||||||
|
This method is useful for credential vending scenarios where storage options
|
||||||
|
may be refreshed dynamically. If no dynamic provider is configured, this
|
||||||
|
returns the initial static options.
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Optional[Dict[str, str]]
|
||||||
|
The storage options, or None if no storage options were configured.
|
||||||
|
"""
|
||||||
|
return LOOP.run(self._table.latest_storage_options())
|
||||||
|
|
||||||
def create_scalar_index(
|
def create_scalar_index(
|
||||||
self,
|
self,
|
||||||
column: str,
|
column: str,
|
||||||
@@ -3624,6 +3655,37 @@ class AsyncTable:
|
|||||||
"""
|
"""
|
||||||
return await self._inner.uri()
|
return await self._inner.uri()
|
||||||
|
|
||||||
|
async def initial_storage_options(self) -> Optional[Dict[str, str]]:
|
||||||
|
"""Get the initial storage options that were passed in when opening this table.
|
||||||
|
|
||||||
|
For dynamically refreshed options (e.g., credential vending), use
|
||||||
|
:meth:`latest_storage_options`.
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Optional[Dict[str, str]]
|
||||||
|
The storage options, or None if no storage options were configured.
|
||||||
|
"""
|
||||||
|
return await self._inner.initial_storage_options()
|
||||||
|
|
||||||
|
async def latest_storage_options(self) -> Optional[Dict[str, str]]:
|
||||||
|
"""Get the latest storage options, refreshing from provider if configured.
|
||||||
|
|
||||||
|
This method is useful for credential vending scenarios where storage options
|
||||||
|
may be refreshed dynamically. If no dynamic provider is configured, this
|
||||||
|
returns the initial static options.
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Optional[Dict[str, str]]
|
||||||
|
The storage options, or None if no storage options were configured.
|
||||||
|
"""
|
||||||
|
return await self._inner.latest_storage_options()
|
||||||
|
|
||||||
async def add(
|
async def add(
|
||||||
self,
|
self,
|
||||||
data: DATA,
|
data: DATA,
|
||||||
|
|||||||
@@ -502,6 +502,20 @@ impl Table {
|
|||||||
future_into_py(self_.py(), async move { inner.uri().await.infer_error() })
|
future_into_py(self_.py(), async move { inner.uri().await.infer_error() })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn initial_storage_options(self_: PyRef<'_, Self>) -> PyResult<Bound<'_, PyAny>> {
|
||||||
|
let inner = self_.inner_ref()?.clone();
|
||||||
|
future_into_py(self_.py(), async move {
|
||||||
|
Ok(inner.initial_storage_options().await)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn latest_storage_options(self_: PyRef<'_, Self>) -> PyResult<Bound<'_, PyAny>> {
|
||||||
|
let inner = self_.inner_ref()?.clone();
|
||||||
|
future_into_py(self_.py(), async move {
|
||||||
|
inner.latest_storage_options().await.infer_error()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
pub fn __repr__(&self) -> String {
|
pub fn __repr__(&self) -> String {
|
||||||
match &self.inner {
|
match &self.inner {
|
||||||
None => format!("ClosedTable({})", self.name),
|
None => format!("ClosedTable({})", self.name),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lancedb"
|
name = "lancedb"
|
||||||
version = "0.24.0"
|
version = "0.24.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
description = "LanceDB: A serverless, low-latency vector database for AI applications"
|
description = "LanceDB: A serverless, low-latency vector database for AI applications"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|||||||
@@ -1493,6 +1493,14 @@ impl<S: HttpSend> BaseTable for RemoteTable<S> {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn initial_storage_options(&self) -> Option<HashMap<String, String>> {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn latest_storage_options(&self) -> Result<Option<HashMap<String, String>>> {
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
|
|
||||||
async fn stats(&self) -> Result<TableStatistics> {
|
async fn stats(&self) -> Result<TableStatistics> {
|
||||||
let request = self
|
let request = self
|
||||||
.client
|
.client
|
||||||
|
|||||||
@@ -611,7 +611,17 @@ pub trait BaseTable: std::fmt::Display + std::fmt::Debug + Send + Sync {
|
|||||||
/// Get the table URI (storage location)
|
/// Get the table URI (storage location)
|
||||||
async fn uri(&self) -> Result<String>;
|
async fn uri(&self) -> Result<String>;
|
||||||
/// Get the storage options used when opening this table, if any.
|
/// Get the storage options used when opening this table, if any.
|
||||||
|
#[deprecated(since = "0.25.0", note = "Use initial_storage_options() instead")]
|
||||||
async fn storage_options(&self) -> Option<HashMap<String, String>>;
|
async fn storage_options(&self) -> Option<HashMap<String, String>>;
|
||||||
|
/// Get the initial storage options that were passed in when opening this table.
|
||||||
|
///
|
||||||
|
/// For dynamically refreshed options (e.g., credential vending), use [`Self::latest_storage_options`].
|
||||||
|
async fn initial_storage_options(&self) -> Option<HashMap<String, String>>;
|
||||||
|
/// Get the latest storage options, refreshing from provider if configured.
|
||||||
|
///
|
||||||
|
/// Returns `Ok(Some(options))` if storage options are available (static or refreshed),
|
||||||
|
/// `Ok(None)` if no storage options were configured, or `Err(...)` if refresh failed.
|
||||||
|
async fn latest_storage_options(&self) -> Result<Option<HashMap<String, String>>>;
|
||||||
/// Poll until the columns are fully indexed. Will return Error::Timeout if the columns
|
/// Poll until the columns are fully indexed. Will return Error::Timeout if the columns
|
||||||
/// are not fully indexed within the timeout.
|
/// are not fully indexed within the timeout.
|
||||||
async fn wait_for_index(
|
async fn wait_for_index(
|
||||||
@@ -1328,10 +1338,32 @@ impl Table {
|
|||||||
/// Get the storage options used when opening this table, if any.
|
/// Get the storage options used when opening this table, if any.
|
||||||
///
|
///
|
||||||
/// Warning: This is an internal API and the return value is subject to change.
|
/// Warning: This is an internal API and the return value is subject to change.
|
||||||
|
#[deprecated(since = "0.25.0", note = "Use initial_storage_options() instead")]
|
||||||
pub async fn storage_options(&self) -> Option<HashMap<String, String>> {
|
pub async fn storage_options(&self) -> Option<HashMap<String, String>> {
|
||||||
|
#[allow(deprecated)]
|
||||||
self.inner.storage_options().await
|
self.inner.storage_options().await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the initial storage options that were passed in when opening this table.
|
||||||
|
///
|
||||||
|
/// For dynamically refreshed options (e.g., credential vending), use [`Self::latest_storage_options`].
|
||||||
|
///
|
||||||
|
/// Warning: This is an internal API and the return value is subject to change.
|
||||||
|
pub async fn initial_storage_options(&self) -> Option<HashMap<String, String>> {
|
||||||
|
self.inner.initial_storage_options().await
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get the latest storage options, refreshing from provider if configured.
|
||||||
|
///
|
||||||
|
/// This method is useful for credential vending scenarios where storage options
|
||||||
|
/// may be refreshed dynamically. If no dynamic provider is configured, this
|
||||||
|
/// returns the initial static options.
|
||||||
|
///
|
||||||
|
/// Warning: This is an internal API and the return value is subject to change.
|
||||||
|
pub async fn latest_storage_options(&self) -> Result<Option<HashMap<String, String>>> {
|
||||||
|
self.inner.latest_storage_options().await
|
||||||
|
}
|
||||||
|
|
||||||
/// Get statistics about an index.
|
/// Get statistics about an index.
|
||||||
/// Returns None if the index does not exist.
|
/// Returns None if the index does not exist.
|
||||||
pub async fn index_stats(
|
pub async fn index_stats(
|
||||||
@@ -3231,6 +3263,10 @@ impl BaseTable for NativeTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn storage_options(&self) -> Option<HashMap<String, String>> {
|
async fn storage_options(&self) -> Option<HashMap<String, String>> {
|
||||||
|
self.initial_storage_options().await
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn initial_storage_options(&self) -> Option<HashMap<String, String>> {
|
||||||
self.dataset
|
self.dataset
|
||||||
.get()
|
.get()
|
||||||
.await
|
.await
|
||||||
@@ -3238,6 +3274,11 @@ impl BaseTable for NativeTable {
|
|||||||
.and_then(|dataset| dataset.initial_storage_options().cloned())
|
.and_then(|dataset| dataset.initial_storage_options().cloned())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn latest_storage_options(&self) -> Result<Option<HashMap<String, String>>> {
|
||||||
|
let dataset = self.dataset.get().await?;
|
||||||
|
Ok(dataset.latest_storage_options().await?.map(|o| o.0))
|
||||||
|
}
|
||||||
|
|
||||||
async fn index_stats(&self, index_name: &str) -> Result<Option<IndexStatistics>> {
|
async fn index_stats(&self, index_name: &str) -> Result<Option<IndexStatistics>> {
|
||||||
let stats = match self
|
let stats = match self
|
||||||
.dataset
|
.dataset
|
||||||
|
|||||||
Reference in New Issue
Block a user