diff --git a/docs/src/client/operations/models/DescribeTableRequest.md b/docs/src/client/operations/models/DescribeTableRequest.md index 29bd8cbf..d5512f2d 100644 --- a/docs/src/client/operations/models/DescribeTableRequest.md +++ b/docs/src/client/operations/models/DescribeTableRequest.md @@ -10,7 +10,8 @@ |**id** | **List<String>** | | [optional] | |**version** | **Long** | Version of the table to describe. If not specified, server should resolve it to the latest version. | [optional] | |**withTableUri** | **Boolean** | Whether to include the table URI in the response. Default is false. | [optional] | -|**loadDetailedMetadata** | **Boolean** | Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. | [optional] | +|**loadDetailedMetadata** | **Boolean** | Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. | [optional] | +|**vendCredentials** | **Boolean** | Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. | [optional] | diff --git a/docs/src/client/operations/models/DescribeTableResponse.md b/docs/src/client/operations/models/DescribeTableResponse.md index 5bfbc4bb..4048c5aa 100644 --- a/docs/src/client/operations/models/DescribeTableResponse.md +++ b/docs/src/client/operations/models/DescribeTableResponse.md @@ -10,11 +10,12 @@ |**table** | **String** | Table name. Only populated when `load_detailed_metadata` is true. | [optional] | |**namespace** | **List<String>** | The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true. | [optional] | |**version** | **Long** | Table version number. Only populated when `load_detailed_metadata` is true. | [optional] | -|**location** | **String** | Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. | | +|**location** | **String** | Table storage location (e.g., S3/GCS path). | [optional] | |**tableUri** | **String** | Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. | [optional] | |**schema** | [**JsonArrowSchema**](JsonArrowSchema.md) | Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. | [optional] | -|**storageOptions** | **Map<String, String>** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. | [optional] | +|**storageOptions** | **Map<String, String>** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. | [optional] | |**stats** | [**TableBasicStats**](TableBasicStats.md) | Table statistics. Only populated when `load_detailed_metadata` is true. | [optional] | +|**metadata** | **Map<String, String>** | Optional table metadata as key-value pairs. | [optional] | diff --git a/docs/src/rest.yaml b/docs/src/rest.yaml index 0e114f3d..a2763cd8 100644 --- a/docs/src/rest.yaml +++ b/docs/src/rest.yaml @@ -2150,16 +2150,20 @@ components: load_detailed_metadata: description: | Whether to load detailed metadata that requires opening the dataset. - When false (default), only `location` is required in the response. - When true, the response includes additional metadata such as `version`, `schema`, and `stats` + When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. + When not set, the implementation can decide whether to return detailed metadata + and which parts of detailed metadata to return. + type: boolean + vend_credentials: + description: | + Whether to include vended credentials in the response `storage_options`. + When true, the implementation should provide vended credentials for accessing storage. + When not set, the implementation can decide whether to return vended credentials. type: boolean - default: false DescribeTableResponse: type: object - required: - - location properties: table: type: string @@ -2184,7 +2188,6 @@ components: type: string description: | Table storage location (e.g., S3/GCS path). - This is the only required field and is always returned. table_uri: type: string description: | @@ -2201,6 +2204,9 @@ components: Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. + When `vend_credentials` is true, this field may include vended credentials. + If the vended credentials are temporary, the `expires_at_millis` key should be + included to indicate the millisecond timestamp when the credentials expire. additionalProperties: type: string stats: @@ -2209,6 +2215,12 @@ components: description: | Table statistics. Only populated when `load_detailed_metadata` is true. + metadata: + type: object + description: | + Optional table metadata as key-value pairs. + additionalProperties: + type: string TableBasicStats: type: object diff --git a/java/lance-namespace-apache-client/api/openapi.yaml b/java/lance-namespace-apache-client/api/openapi.yaml index 2a31d65c..dea7ef27 100644 --- a/java/lance-namespace-apache-client/api/openapi.yaml +++ b/java/lance-namespace-apache-client/api/openapi.yaml @@ -2886,7 +2886,8 @@ components: - id version: 0 with_table_uri: false - load_detailed_metadata: false + load_detailed_metadata: true + vend_credentials: true properties: id: items: @@ -2906,12 +2907,18 @@ components: Default is false. type: boolean load_detailed_metadata: - default: false description: | Whether to load detailed metadata that requires opening the dataset. - When false (default), only `location` is required in the response. - When true, the response includes additional metadata such as `version`, `schema`, and `stats` + When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. + When not set, the implementation can decide whether to return detailed metadata + and which parts of detailed metadata to return. + type: boolean + vend_credentials: + description: | + Whether to include vended credentials in the response `storage_options`. + When true, the implementation should provide vended credentials for accessing storage. + When not set, the implementation can decide whether to return vended credentials. type: boolean DescribeTableResponse: example: @@ -2939,6 +2946,8 @@ components: - null - null type: type + metadata: + key: metadata table_uri: table_uri stats: num_deleted_rows: 0 @@ -2974,7 +2983,6 @@ components: location: description: | Table storage location (e.g., S3/GCS path). - This is the only required field and is always returned. type: string table_uri: description: | @@ -2990,10 +2998,16 @@ components: Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. + When `vend_credentials` is true, this field may include vended credentials. + If the vended credentials are temporary, the `expires_at_millis` key should be + included to indicate the millisecond timestamp when the credentials expire. stats: $ref: '#/components/schemas/TableBasicStats' - required: - - location + metadata: + additionalProperties: + type: string + description: | + Optional table metadata as key-value pairs. TableBasicStats: example: num_deleted_rows: 0 diff --git a/java/lance-namespace-apache-client/docs/DescribeTableRequest.md b/java/lance-namespace-apache-client/docs/DescribeTableRequest.md index 29bd8cbf..d5512f2d 100644 --- a/java/lance-namespace-apache-client/docs/DescribeTableRequest.md +++ b/java/lance-namespace-apache-client/docs/DescribeTableRequest.md @@ -10,7 +10,8 @@ |**id** | **List<String>** | | [optional] | |**version** | **Long** | Version of the table to describe. If not specified, server should resolve it to the latest version. | [optional] | |**withTableUri** | **Boolean** | Whether to include the table URI in the response. Default is false. | [optional] | -|**loadDetailedMetadata** | **Boolean** | Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. | [optional] | +|**loadDetailedMetadata** | **Boolean** | Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. | [optional] | +|**vendCredentials** | **Boolean** | Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. | [optional] | diff --git a/java/lance-namespace-apache-client/docs/DescribeTableResponse.md b/java/lance-namespace-apache-client/docs/DescribeTableResponse.md index 5bfbc4bb..4048c5aa 100644 --- a/java/lance-namespace-apache-client/docs/DescribeTableResponse.md +++ b/java/lance-namespace-apache-client/docs/DescribeTableResponse.md @@ -10,11 +10,12 @@ |**table** | **String** | Table name. Only populated when `load_detailed_metadata` is true. | [optional] | |**namespace** | **List<String>** | The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true. | [optional] | |**version** | **Long** | Table version number. Only populated when `load_detailed_metadata` is true. | [optional] | -|**location** | **String** | Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. | | +|**location** | **String** | Table storage location (e.g., S3/GCS path). | [optional] | |**tableUri** | **String** | Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. | [optional] | |**schema** | [**JsonArrowSchema**](JsonArrowSchema.md) | Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. | [optional] | -|**storageOptions** | **Map<String, String>** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. | [optional] | +|**storageOptions** | **Map<String, String>** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. | [optional] | |**stats** | [**TableBasicStats**](TableBasicStats.md) | Table statistics. Only populated when `load_detailed_metadata` is true. | [optional] | +|**metadata** | **Map<String, String>** | Optional table metadata as key-value pairs. | [optional] | diff --git a/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableRequest.java b/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableRequest.java index 6225dc32..82c2bd14 100644 --- a/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableRequest.java +++ b/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableRequest.java @@ -29,7 +29,8 @@ DescribeTableRequest.JSON_PROPERTY_ID, DescribeTableRequest.JSON_PROPERTY_VERSION, DescribeTableRequest.JSON_PROPERTY_WITH_TABLE_URI, - DescribeTableRequest.JSON_PROPERTY_LOAD_DETAILED_METADATA + DescribeTableRequest.JSON_PROPERTY_LOAD_DETAILED_METADATA, + DescribeTableRequest.JSON_PROPERTY_VEND_CREDENTIALS }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -45,7 +46,10 @@ public class DescribeTableRequest { @javax.annotation.Nullable private Boolean withTableUri = false; public static final String JSON_PROPERTY_LOAD_DETAILED_METADATA = "load_detailed_metadata"; - @javax.annotation.Nullable private Boolean loadDetailedMetadata = false; + @javax.annotation.Nullable private Boolean loadDetailedMetadata; + + public static final String JSON_PROPERTY_VEND_CREDENTIALS = "vend_credentials"; + @javax.annotation.Nullable private Boolean vendCredentials; public DescribeTableRequest() {} @@ -138,10 +142,10 @@ public DescribeTableRequest loadDetailedMetadata( } /** - * Whether to load detailed metadata that requires opening the dataset. When false (default), only - * `location` is required in the response. When true, the response includes additional - * metadata such as `version`, `schema`, and `stats` which require - * reading the dataset. + * Whether to load detailed metadata that requires opening the dataset. When true, the response + * must include all detailed metadata such as `version`, `schema`, and + * `stats` which require reading the dataset. When not set, the implementation can + * decide whether to return detailed metadata and which parts of detailed metadata to return. * * @return loadDetailedMetadata */ @@ -158,6 +162,32 @@ public void setLoadDetailedMetadata(@javax.annotation.Nullable Boolean loadDetai this.loadDetailedMetadata = loadDetailedMetadata; } + public DescribeTableRequest vendCredentials(@javax.annotation.Nullable Boolean vendCredentials) { + + this.vendCredentials = vendCredentials; + return this; + } + + /** + * Whether to include vended credentials in the response `storage_options`. When true, + * the implementation should provide vended credentials for accessing storage. When not set, the + * implementation can decide whether to return vended credentials. + * + * @return vendCredentials + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VEND_CREDENTIALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVendCredentials() { + return vendCredentials; + } + + @JsonProperty(JSON_PROPERTY_VEND_CREDENTIALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVendCredentials(@javax.annotation.Nullable Boolean vendCredentials) { + this.vendCredentials = vendCredentials; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -170,12 +200,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, describeTableRequest.id) && Objects.equals(this.version, describeTableRequest.version) && Objects.equals(this.withTableUri, describeTableRequest.withTableUri) - && Objects.equals(this.loadDetailedMetadata, describeTableRequest.loadDetailedMetadata); + && Objects.equals(this.loadDetailedMetadata, describeTableRequest.loadDetailedMetadata) + && Objects.equals(this.vendCredentials, describeTableRequest.vendCredentials); } @Override public int hashCode() { - return Objects.hash(id, version, withTableUri, loadDetailedMetadata); + return Objects.hash(id, version, withTableUri, loadDetailedMetadata, vendCredentials); } @Override @@ -188,6 +219,7 @@ public String toString() { sb.append(" loadDetailedMetadata: ") .append(toIndentedString(loadDetailedMetadata)) .append("\n"); + sb.append(" vendCredentials: ").append(toIndentedString(vendCredentials)).append("\n"); sb.append("}"); return sb.toString(); } @@ -302,6 +334,22 @@ public String toUrlQueryString(String prefix) { } } + // add `vend_credentials` to the URL query string + if (getVendCredentials() != null) { + try { + joiner.add( + String.format( + "%svend_credentials%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVendCredentials()), "UTF-8") + .replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + return joiner.toString(); } } diff --git a/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableResponse.java b/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableResponse.java index f950537b..5ac476c6 100644 --- a/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableResponse.java +++ b/java/lance-namespace-apache-client/src/main/java/org/lance/namespace/model/DescribeTableResponse.java @@ -35,7 +35,8 @@ DescribeTableResponse.JSON_PROPERTY_TABLE_URI, DescribeTableResponse.JSON_PROPERTY_SCHEMA, DescribeTableResponse.JSON_PROPERTY_STORAGE_OPTIONS, - DescribeTableResponse.JSON_PROPERTY_STATS + DescribeTableResponse.JSON_PROPERTY_STATS, + DescribeTableResponse.JSON_PROPERTY_METADATA }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -51,7 +52,7 @@ public class DescribeTableResponse { @javax.annotation.Nullable private Long version; public static final String JSON_PROPERTY_LOCATION = "location"; - @javax.annotation.Nonnull private String location; + @javax.annotation.Nullable private String location; public static final String JSON_PROPERTY_TABLE_URI = "table_uri"; @javax.annotation.Nullable private String tableUri; @@ -65,6 +66,9 @@ public class DescribeTableResponse { public static final String JSON_PROPERTY_STATS = "stats"; @javax.annotation.Nullable private TableBasicStats stats; + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = new HashMap<>(); + public DescribeTableResponse() {} public DescribeTableResponse table(@javax.annotation.Nullable String table) { @@ -149,28 +153,27 @@ public void setVersion(@javax.annotation.Nullable Long version) { this.version = version; } - public DescribeTableResponse location(@javax.annotation.Nonnull String location) { + public DescribeTableResponse location(@javax.annotation.Nullable String location) { this.location = location; return this; } /** - * Table storage location (e.g., S3/GCS path). This is the only required field and is always - * returned. + * Table storage location (e.g., S3/GCS path). * * @return location */ - @javax.annotation.Nonnull + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getLocation() { return location; } @JsonProperty(JSON_PROPERTY_LOCATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setLocation(@javax.annotation.Nonnull String location) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocation(@javax.annotation.Nullable String location) { this.location = location; } @@ -241,7 +244,10 @@ public DescribeTableResponse putStorageOptionsItem(String key, String storageOpt /** * Configuration options to be used to access storage. The available options depend on the type of - * storage in use. These will be passed directly to Lance to initialize storage access. + * storage in use. These will be passed directly to Lance to initialize storage access. When + * `vend_credentials` is true, this field may include vended credentials. If the vended + * credentials are temporary, the `expires_at_millis` key should be included to indicate + * the millisecond timestamp when the credentials expire. * * @return storageOptions */ @@ -282,6 +288,38 @@ public void setStats(@javax.annotation.Nullable TableBasicStats stats) { this.stats = stats; } + public DescribeTableResponse metadata(@javax.annotation.Nullable Map metadata) { + + this.metadata = metadata; + return this; + } + + public DescribeTableResponse putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Optional table metadata as key-value pairs. + * + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -298,13 +336,14 @@ public boolean equals(Object o) { && Objects.equals(this.tableUri, describeTableResponse.tableUri) && Objects.equals(this.schema, describeTableResponse.schema) && Objects.equals(this.storageOptions, describeTableResponse.storageOptions) - && Objects.equals(this.stats, describeTableResponse.stats); + && Objects.equals(this.stats, describeTableResponse.stats) + && Objects.equals(this.metadata, describeTableResponse.metadata); } @Override public int hashCode() { return Objects.hash( - table, namespace, version, location, tableUri, schema, storageOptions, stats); + table, namespace, version, location, tableUri, schema, storageOptions, stats, metadata); } @Override @@ -319,6 +358,7 @@ public String toString() { sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); sb.append(" storageOptions: ").append(toIndentedString(storageOptions)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } @@ -480,6 +520,28 @@ public String toUrlQueryString(String prefix) { joiner.add(getStats().toUrlQueryString(prefix + "stats" + suffix)); } + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + try { + joiner.add( + String.format( + "%smetadata%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), + URLEncoder.encode(String.valueOf(getMetadata().get(_key)), "UTF-8") + .replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + return joiner.toString(); } } diff --git a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/api/TableApi.java b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/api/TableApi.java index 3e124669..121f28e0 100644 --- a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/api/TableApi.java +++ b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/api/TableApi.java @@ -2759,7 +2759,7 @@ default ResponseEntity describeTable( for (MediaType mediaType : MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = - "{ \"schema\" : { \"metadata\" : { \"key\" : \"metadata\" }, \"fields\" : [ { \"metadata\" : { \"key\" : \"metadata\" }, \"nullable\" : true, \"name\" : \"name\", \"type\" : { \"length\" : 0, \"fields\" : [ null, null ], \"type\" : \"type\" } }, { \"metadata\" : { \"key\" : \"metadata\" }, \"nullable\" : true, \"name\" : \"name\", \"type\" : { \"length\" : 0, \"fields\" : [ null, null ], \"type\" : \"type\" } } ] }, \"table_uri\" : \"table_uri\", \"stats\" : { \"num_deleted_rows\" : 0, \"num_fragments\" : 0 }, \"namespace\" : [ \"namespace\", \"namespace\" ], \"location\" : \"location\", \"version\" : 0, \"table\" : \"table\", \"storage_options\" : { \"key\" : \"storage_options\" } }"; + "{ \"schema\" : { \"metadata\" : { \"key\" : \"metadata\" }, \"fields\" : [ { \"metadata\" : { \"key\" : \"metadata\" }, \"nullable\" : true, \"name\" : \"name\", \"type\" : { \"length\" : 0, \"fields\" : [ null, null ], \"type\" : \"type\" } }, { \"metadata\" : { \"key\" : \"metadata\" }, \"nullable\" : true, \"name\" : \"name\", \"type\" : { \"length\" : 0, \"fields\" : [ null, null ], \"type\" : \"type\" } } ] }, \"metadata\" : { \"key\" : \"metadata\" }, \"table_uri\" : \"table_uri\", \"stats\" : { \"num_deleted_rows\" : 0, \"num_fragments\" : 0 }, \"namespace\" : [ \"namespace\", \"namespace\" ], \"location\" : \"location\", \"version\" : 0, \"table\" : \"table\", \"storage_options\" : { \"key\" : \"storage_options\" } }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableRequest.java b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableRequest.java index 17147666..0e37b08a 100644 --- a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableRequest.java +++ b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableRequest.java @@ -36,7 +36,9 @@ public class DescribeTableRequest { private Boolean withTableUri = false; - private Boolean loadDetailedMetadata = false; + private Boolean loadDetailedMetadata; + + private Boolean vendCredentials; public DescribeTableRequest id(List id) { this.id = id; @@ -121,16 +123,17 @@ public DescribeTableRequest loadDetailedMetadata(Boolean loadDetailedMetadata) { } /** - * Whether to load detailed metadata that requires opening the dataset. When false (default), only - * `location` is required in the response. When true, the response includes additional metadata - * such as `version`, `schema`, and `stats` which require reading the dataset. + * Whether to load detailed metadata that requires opening the dataset. When true, the response + * must include all detailed metadata such as `version`, `schema`, and `stats` which require + * reading the dataset. When not set, the implementation can decide whether to return detailed + * metadata and which parts of detailed metadata to return. * * @return loadDetailedMetadata */ @Schema( name = "load_detailed_metadata", description = - "Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. ", + "Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("load_detailed_metadata") public Boolean getLoadDetailedMetadata() { @@ -141,6 +144,32 @@ public void setLoadDetailedMetadata(Boolean loadDetailedMetadata) { this.loadDetailedMetadata = loadDetailedMetadata; } + public DescribeTableRequest vendCredentials(Boolean vendCredentials) { + this.vendCredentials = vendCredentials; + return this; + } + + /** + * Whether to include vended credentials in the response `storage_options`. When true, the + * implementation should provide vended credentials for accessing storage. When not set, the + * implementation can decide whether to return vended credentials. + * + * @return vendCredentials + */ + @Schema( + name = "vend_credentials", + description = + "Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. ", + requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("vend_credentials") + public Boolean getVendCredentials() { + return vendCredentials; + } + + public void setVendCredentials(Boolean vendCredentials) { + this.vendCredentials = vendCredentials; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -153,12 +182,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, describeTableRequest.id) && Objects.equals(this.version, describeTableRequest.version) && Objects.equals(this.withTableUri, describeTableRequest.withTableUri) - && Objects.equals(this.loadDetailedMetadata, describeTableRequest.loadDetailedMetadata); + && Objects.equals(this.loadDetailedMetadata, describeTableRequest.loadDetailedMetadata) + && Objects.equals(this.vendCredentials, describeTableRequest.vendCredentials); } @Override public int hashCode() { - return Objects.hash(id, version, withTableUri, loadDetailedMetadata); + return Objects.hash(id, version, withTableUri, loadDetailedMetadata, vendCredentials); } @Override @@ -171,6 +201,7 @@ public String toString() { sb.append(" loadDetailedMetadata: ") .append(toIndentedString(loadDetailedMetadata)) .append("\n"); + sb.append(" vendCredentials: ").append(toIndentedString(vendCredentials)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableResponse.java b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableResponse.java index 5609f519..a6bfd821 100644 --- a/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableResponse.java +++ b/java/lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/model/DescribeTableResponse.java @@ -48,14 +48,7 @@ public class DescribeTableResponse { private TableBasicStats stats; - public DescribeTableResponse() { - super(); - } - - /** Constructor with only required parameters */ - public DescribeTableResponse(String location) { - this.location = location; - } + @Valid private Map metadata = new HashMap<>(); public DescribeTableResponse table(String table) { this.table = table; @@ -143,17 +136,14 @@ public DescribeTableResponse location(String location) { } /** - * Table storage location (e.g., S3/GCS path). This is the only required field and is always - * returned. + * Table storage location (e.g., S3/GCS path). * * @return location */ - @NotNull @Schema( name = "location", - description = - "Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. ", - requiredMode = Schema.RequiredMode.REQUIRED) + description = "Table storage location (e.g., S3/GCS path). ", + requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("location") public String getLocation() { return location; @@ -228,14 +218,17 @@ public DescribeTableResponse putStorageOptionsItem(String key, String storageOpt /** * Configuration options to be used to access storage. The available options depend on the type of - * storage in use. These will be passed directly to Lance to initialize storage access. + * storage in use. These will be passed directly to Lance to initialize storage access. When + * `vend_credentials` is true, this field may include vended credentials. If the vended + * credentials are temporary, the `expires_at_millis` key should be included to indicate the + * millisecond timestamp when the credentials expire. * * @return storageOptions */ @Schema( name = "storage_options", description = - "Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. ", + "Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("storage_options") public Map getStorageOptions() { @@ -270,6 +263,37 @@ public void setStats(TableBasicStats stats) { this.stats = stats; } + public DescribeTableResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public DescribeTableResponse putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Optional table metadata as key-value pairs. + * + * @return metadata + */ + @Schema( + name = "metadata", + description = "Optional table metadata as key-value pairs. ", + requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("metadata") + public Map getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -286,13 +310,14 @@ public boolean equals(Object o) { && Objects.equals(this.tableUri, describeTableResponse.tableUri) && Objects.equals(this.schema, describeTableResponse.schema) && Objects.equals(this.storageOptions, describeTableResponse.storageOptions) - && Objects.equals(this.stats, describeTableResponse.stats); + && Objects.equals(this.stats, describeTableResponse.stats) + && Objects.equals(this.metadata, describeTableResponse.metadata); } @Override public int hashCode() { return Objects.hash( - table, namespace, version, location, tableUri, schema, storageOptions, stats); + table, namespace, version, location, tableUri, schema, storageOptions, stats, metadata); } @Override @@ -307,6 +332,7 @@ public String toString() { sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); sb.append(" storageOptions: ").append(toIndentedString(storageOptions)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/python/lance_namespace_urllib3_client/docs/DescribeTableRequest.md b/python/lance_namespace_urllib3_client/docs/DescribeTableRequest.md index 2cc0946a..dd4194be 100644 --- a/python/lance_namespace_urllib3_client/docs/DescribeTableRequest.md +++ b/python/lance_namespace_urllib3_client/docs/DescribeTableRequest.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes **id** | **List[str]** | | [optional] **version** | **int** | Version of the table to describe. If not specified, server should resolve it to the latest version. | [optional] **with_table_uri** | **bool** | Whether to include the table URI in the response. Default is false. | [optional] [default to False] -**load_detailed_metadata** | **bool** | Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. | [optional] [default to False] +**load_detailed_metadata** | **bool** | Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. | [optional] +**vend_credentials** | **bool** | Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. | [optional] ## Example diff --git a/python/lance_namespace_urllib3_client/docs/DescribeTableResponse.md b/python/lance_namespace_urllib3_client/docs/DescribeTableResponse.md index eb66598e..6dfa1d19 100644 --- a/python/lance_namespace_urllib3_client/docs/DescribeTableResponse.md +++ b/python/lance_namespace_urllib3_client/docs/DescribeTableResponse.md @@ -8,11 +8,12 @@ Name | Type | Description | Notes **table** | **str** | Table name. Only populated when `load_detailed_metadata` is true. | [optional] **namespace** | **List[str]** | The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true. | [optional] **version** | **int** | Table version number. Only populated when `load_detailed_metadata` is true. | [optional] -**location** | **str** | Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. | +**location** | **str** | Table storage location (e.g., S3/GCS path). | [optional] **table_uri** | **str** | Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. | [optional] **var_schema** | [**JsonArrowSchema**](JsonArrowSchema.md) | Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. | [optional] -**storage_options** | **Dict[str, str]** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. | [optional] +**storage_options** | **Dict[str, str]** | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. | [optional] **stats** | [**TableBasicStats**](TableBasicStats.md) | Table statistics. Only populated when `load_detailed_metadata` is true. | [optional] +**metadata** | **Dict[str, str]** | Optional table metadata as key-value pairs. | [optional] ## Example diff --git a/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_request.py b/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_request.py index c01e078e..3aca7b3b 100644 --- a/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_request.py +++ b/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_request.py @@ -30,8 +30,9 @@ class DescribeTableRequest(BaseModel): id: Optional[List[StrictStr]] = None version: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Version of the table to describe. If not specified, server should resolve it to the latest version. ") with_table_uri: Optional[StrictBool] = Field(default=False, description="Whether to include the table URI in the response. Default is false. ") - load_detailed_metadata: Optional[StrictBool] = Field(default=False, description="Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. ") - __properties: ClassVar[List[str]] = ["id", "version", "with_table_uri", "load_detailed_metadata"] + load_detailed_metadata: Optional[StrictBool] = Field(default=None, description="Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. ") + vend_credentials: Optional[StrictBool] = Field(default=None, description="Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. ") + __properties: ClassVar[List[str]] = ["id", "version", "with_table_uri", "load_detailed_metadata", "vend_credentials"] model_config = ConfigDict( populate_by_name=True, @@ -87,7 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "version": obj.get("version"), "with_table_uri": obj.get("with_table_uri") if obj.get("with_table_uri") is not None else False, - "load_detailed_metadata": obj.get("load_detailed_metadata") if obj.get("load_detailed_metadata") is not None else False + "load_detailed_metadata": obj.get("load_detailed_metadata"), + "vend_credentials": obj.get("vend_credentials") }) return _obj diff --git a/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_response.py b/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_response.py index 7c3d7988..f941bf7b 100644 --- a/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_response.py +++ b/python/lance_namespace_urllib3_client/lance_namespace_urllib3_client/models/describe_table_response.py @@ -32,12 +32,13 @@ class DescribeTableResponse(BaseModel): table: Optional[StrictStr] = Field(default=None, description="Table name. Only populated when `load_detailed_metadata` is true. ") namespace: Optional[List[StrictStr]] = Field(default=None, description="The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true. ") version: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Table version number. Only populated when `load_detailed_metadata` is true. ") - location: StrictStr = Field(description="Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. ") + location: Optional[StrictStr] = Field(default=None, description="Table storage location (e.g., S3/GCS path). ") table_uri: Optional[StrictStr] = Field(default=None, description="Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. ") var_schema: Optional[JsonArrowSchema] = Field(default=None, description="Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. ", alias="schema") - storage_options: Optional[Dict[str, StrictStr]] = Field(default=None, description="Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. ") + storage_options: Optional[Dict[str, StrictStr]] = Field(default=None, description="Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. ") stats: Optional[TableBasicStats] = Field(default=None, description="Table statistics. Only populated when `load_detailed_metadata` is true. ") - __properties: ClassVar[List[str]] = ["table", "namespace", "version", "location", "table_uri", "schema", "storage_options", "stats"] + metadata: Optional[Dict[str, StrictStr]] = Field(default=None, description="Optional table metadata as key-value pairs. ") + __properties: ClassVar[List[str]] = ["table", "namespace", "version", "location", "table_uri", "schema", "storage_options", "stats", "metadata"] model_config = ConfigDict( populate_by_name=True, @@ -103,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "table_uri": obj.get("table_uri"), "schema": JsonArrowSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None, "storage_options": obj.get("storage_options"), - "stats": TableBasicStats.from_dict(obj["stats"]) if obj.get("stats") is not None else None + "stats": TableBasicStats.from_dict(obj["stats"]) if obj.get("stats") is not None else None, + "metadata": obj.get("metadata") }) return _obj diff --git a/python/lance_namespace_urllib3_client/test/test_describe_table_request.py b/python/lance_namespace_urllib3_client/test/test_describe_table_request.py index 7484e912..4d61aa92 100644 --- a/python/lance_namespace_urllib3_client/test/test_describe_table_request.py +++ b/python/lance_namespace_urllib3_client/test/test_describe_table_request.py @@ -40,7 +40,8 @@ def make_instance(self, include_optional) -> DescribeTableRequest: ], version = 0, with_table_uri = True, - load_detailed_metadata = True + load_detailed_metadata = True, + vend_credentials = True ) else: return DescribeTableRequest( diff --git a/python/lance_namespace_urllib3_client/test/test_describe_table_response.py b/python/lance_namespace_urllib3_client/test/test_describe_table_response.py index 59a797fa..794b6673 100644 --- a/python/lance_namespace_urllib3_client/test/test_describe_table_response.py +++ b/python/lance_namespace_urllib3_client/test/test_describe_table_response.py @@ -62,11 +62,13 @@ def make_instance(self, include_optional) -> DescribeTableResponse: }, stats = lance_namespace_urllib3_client.models.table_basic_stats.TableBasicStats( num_deleted_rows = 0, - num_fragments = 0, ) + num_fragments = 0, ), + metadata = { + 'key' : '' + } ) else: return DescribeTableResponse( - location = '', ) """ diff --git a/rust/lance-namespace-reqwest-client/docs/DescribeTableRequest.md b/rust/lance-namespace-reqwest-client/docs/DescribeTableRequest.md index fe56f587..92a3ec43 100644 --- a/rust/lance-namespace-reqwest-client/docs/DescribeTableRequest.md +++ b/rust/lance-namespace-reqwest-client/docs/DescribeTableRequest.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **id** | Option<**Vec**> | | [optional] **version** | Option<**i64**> | Version of the table to describe. If not specified, server should resolve it to the latest version. | [optional] **with_table_uri** | Option<**bool**> | Whether to include the table URI in the response. Default is false. | [optional][default to false] -**load_detailed_metadata** | Option<**bool**> | Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. | [optional][default to false] +**load_detailed_metadata** | Option<**bool**> | Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. | [optional] +**vend_credentials** | Option<**bool**> | Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/lance-namespace-reqwest-client/docs/DescribeTableResponse.md b/rust/lance-namespace-reqwest-client/docs/DescribeTableResponse.md index 4923e603..83db4cb4 100644 --- a/rust/lance-namespace-reqwest-client/docs/DescribeTableResponse.md +++ b/rust/lance-namespace-reqwest-client/docs/DescribeTableResponse.md @@ -7,11 +7,12 @@ Name | Type | Description | Notes **table** | Option<**String**> | Table name. Only populated when `load_detailed_metadata` is true. | [optional] **namespace** | Option<**Vec**> | The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true. | [optional] **version** | Option<**i64**> | Table version number. Only populated when `load_detailed_metadata` is true. | [optional] -**location** | **String** | Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. | +**location** | Option<**String**> | Table storage location (e.g., S3/GCS path). | [optional] **table_uri** | Option<**String**> | Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. | [optional] **schema** | Option<[**models::JsonArrowSchema**](JsonArrowSchema.md)> | Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. | [optional] -**storage_options** | Option<**std::collections::HashMap**> | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. | [optional] +**storage_options** | Option<**std::collections::HashMap**> | Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. | [optional] **stats** | Option<[**models::TableBasicStats**](TableBasicStats.md)> | Table statistics. Only populated when `load_detailed_metadata` is true. | [optional] +**metadata** | Option<**std::collections::HashMap**> | Optional table metadata as key-value pairs. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/lance-namespace-reqwest-client/src/models/describe_table_request.rs b/rust/lance-namespace-reqwest-client/src/models/describe_table_request.rs index fb9224ae..ddcbd5ca 100644 --- a/rust/lance-namespace-reqwest-client/src/models/describe_table_request.rs +++ b/rust/lance-namespace-reqwest-client/src/models/describe_table_request.rs @@ -21,9 +21,12 @@ pub struct DescribeTableRequest { /// Whether to include the table URI in the response. Default is false. #[serde(rename = "with_table_uri", skip_serializing_if = "Option::is_none")] pub with_table_uri: Option, - /// Whether to load detailed metadata that requires opening the dataset. When false (default), only `location` is required in the response. When true, the response includes additional metadata such as `version`, `schema`, and `stats` which require reading the dataset. + /// Whether to load detailed metadata that requires opening the dataset. When true, the response must include all detailed metadata such as `version`, `schema`, and `stats` which require reading the dataset. When not set, the implementation can decide whether to return detailed metadata and which parts of detailed metadata to return. #[serde(rename = "load_detailed_metadata", skip_serializing_if = "Option::is_none")] pub load_detailed_metadata: Option, + /// Whether to include vended credentials in the response `storage_options`. When true, the implementation should provide vended credentials for accessing storage. When not set, the implementation can decide whether to return vended credentials. + #[serde(rename = "vend_credentials", skip_serializing_if = "Option::is_none")] + pub vend_credentials: Option, } impl DescribeTableRequest { @@ -33,6 +36,7 @@ impl DescribeTableRequest { version: None, with_table_uri: None, load_detailed_metadata: None, + vend_credentials: None, } } } diff --git a/rust/lance-namespace-reqwest-client/src/models/describe_table_response.rs b/rust/lance-namespace-reqwest-client/src/models/describe_table_response.rs index 597924d6..29e73da3 100644 --- a/rust/lance-namespace-reqwest-client/src/models/describe_table_response.rs +++ b/rust/lance-namespace-reqwest-client/src/models/describe_table_response.rs @@ -22,34 +22,38 @@ pub struct DescribeTableResponse { /// Table version number. Only populated when `load_detailed_metadata` is true. #[serde(rename = "version", skip_serializing_if = "Option::is_none")] pub version: Option, - /// Table storage location (e.g., S3/GCS path). This is the only required field and is always returned. - #[serde(rename = "location")] - pub location: String, + /// Table storage location (e.g., S3/GCS path). + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, /// Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true. #[serde(rename = "table_uri", skip_serializing_if = "Option::is_none")] pub table_uri: Option, /// Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true. #[serde(rename = "schema", skip_serializing_if = "Option::is_none")] pub schema: Option>, - /// Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. + /// Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire. #[serde(rename = "storage_options", skip_serializing_if = "Option::is_none")] pub storage_options: Option>, /// Table statistics. Only populated when `load_detailed_metadata` is true. #[serde(rename = "stats", skip_serializing_if = "Option::is_none")] pub stats: Option>, + /// Optional table metadata as key-value pairs. + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, } impl DescribeTableResponse { - pub fn new(location: String) -> DescribeTableResponse { + pub fn new() -> DescribeTableResponse { DescribeTableResponse { table: None, namespace: None, version: None, - location, + location: None, table_uri: None, schema: None, storage_options: None, stats: None, + metadata: None, } } }