Skip to content

Commit 6b383e6

Browse files
jackye1995claude
andauthored
feat: default include_declared to true in ListTables (#332)
## Summary - Default `include_declared` to `true` in `ListTablesRequest` schema and REST query parameter for backwards compatibility - Add `include_declared` query parameter to both `ListTables` and `ListAllTables` REST endpoints --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2cd89a6 commit 6b383e6

39 files changed

Lines changed: 443 additions & 148 deletions

File tree

docs/src/client/operations/models/ListTablesRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|**id** | **List&lt;String&gt;** | | [optional] |
1313
|**pageToken** | **String** | An opaque token that allows pagination for list operations (e.g. ListNamespaces). For an initial request of a list operation, if the implementation cannot return all items in one response, or if there are more items than the page limit specified in the request, the implementation must return a page token in the response, indicating there are more results available. After the initial request, the value of the page token from each response must be used as the page token value for the next request. Caller must interpret either &#x60;null&#x60;, missing value or empty string value of the page token from the implementation&#39;s response as the end of the listing results. | [optional] |
1414
|**limit** | **Integer** | An inclusive upper bound of the number of results that a caller will receive. | [optional] |
15-
|**includeDeclared** | **Boolean** | When true, includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false or not set, only tables with storage components are returned. | [optional] |
15+
|**includeDeclared** | **Boolean** | When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned. | [optional] |
1616

1717

1818

docs/src/rest.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ paths:
275275
- $ref: "#/components/parameters/delimiter"
276276
- $ref: "#/components/parameters/page_token"
277277
- $ref: "#/components/parameters/limit"
278+
- $ref: "#/components/parameters/include_declared"
278279
get:
279280
tags:
280281
- Namespace
@@ -291,6 +292,7 @@ paths:
291292
- `id`: pass through path parameter of the same name
292293
- `page_token`: pass through query parameter of the same name
293294
- `limit`: pass through query parameter of the same name
295+
- `include_declared`: pass through query parameter of the same name
294296
responses:
295297
200:
296298
$ref: "#/components/responses/ListTablesResponse"
@@ -326,10 +328,12 @@ paths:
326328
- `page_token`: pass through query parameter of the same name
327329
- `limit`: pass through query parameter of the same name
328330
- `delimiter`: pass through query parameter of the same name
331+
- `include_declared`: pass through query parameter of the same name
329332
parameters:
330333
- $ref: "#/components/parameters/delimiter"
331334
- $ref: "#/components/parameters/page_token"
332335
- $ref: "#/components/parameters/limit"
336+
- $ref: "#/components/parameters/include_declared"
333337
responses:
334338
200:
335339
$ref: "#/components/responses/ListTablesResponse"
@@ -2042,6 +2046,18 @@ components:
20422046
schema:
20432047
type: boolean
20442048
default: false
2049+
include_declared:
2050+
name: include_declared
2051+
description: |
2052+
When true (default), includes tables that have been declared in the namespace
2053+
but not yet created on storage, in addition to tables that have
2054+
been created. When false, only tables with storage
2055+
components are returned.
2056+
in: query
2057+
required: false
2058+
schema:
2059+
type: boolean
2060+
default: true
20452061
load_detailed_metadata:
20462062
name: load_detailed_metadata
20472063
description: |
@@ -2387,10 +2403,11 @@ components:
23872403
$ref: "#/components/schemas/PageLimit"
23882404
include_declared:
23892405
type: boolean
2406+
default: true
23902407
description: |
2391-
When true, includes tables that have been declared in the namespace
2408+
When true (default), includes tables that have been declared in the namespace
23922409
but not yet created on storage, in addition to tables that have
2393-
been created. When false or not set, only tables with storage
2410+
been created. When false, only tables with storage
23942411
components are returned.
23952412
23962413
ListTablesResponse:

java/lance-namespace-apache-client/api/openapi.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,14 @@ paths:
288288
- `id`: pass through path parameter of the same name
289289
- `page_token`: pass through query parameter of the same name
290290
- `limit`: pass through query parameter of the same name
291+
- `include_declared`: pass through query parameter of the same name
291292
operationId: ListTables
292293
parameters:
293294
- $ref: '#/components/parameters/id'
294295
- $ref: '#/components/parameters/delimiter'
295296
- $ref: '#/components/parameters/page_token'
296297
- $ref: '#/components/parameters/limit'
298+
- $ref: '#/components/parameters/include_declared'
297299
responses:
298300
"200":
299301
$ref: '#/components/responses/ListTablesResponse'
@@ -323,6 +325,7 @@ paths:
323325
- $ref: '#/components/parameters/delimiter'
324326
- $ref: '#/components/parameters/page_token'
325327
- $ref: '#/components/parameters/limit'
328+
- $ref: '#/components/parameters/include_declared'
326329
/v1/table:
327330
get:
328331
description: |
@@ -334,11 +337,13 @@ paths:
334337
- `page_token`: pass through query parameter of the same name
335338
- `limit`: pass through query parameter of the same name
336339
- `delimiter`: pass through query parameter of the same name
340+
- `include_declared`: pass through query parameter of the same name
337341
operationId: ListAllTables
338342
parameters:
339343
- $ref: '#/components/parameters/delimiter'
340344
- $ref: '#/components/parameters/page_token'
341345
- $ref: '#/components/parameters/limit'
346+
- $ref: '#/components/parameters/include_declared'
342347
responses:
343348
"200":
344349
$ref: '#/components/responses/ListTablesResponse'
@@ -2440,6 +2445,20 @@ components:
24402445
default: false
24412446
type: boolean
24422447
style: form
2448+
include_declared:
2449+
description: |
2450+
When true (default), includes tables that have been declared in the namespace
2451+
but not yet created on storage, in addition to tables that have
2452+
been created. When false, only tables with storage
2453+
components are returned.
2454+
explode: true
2455+
in: query
2456+
name: include_declared
2457+
required: false
2458+
schema:
2459+
default: true
2460+
type: boolean
2461+
style: form
24432462
load_detailed_metadata:
24442463
description: |
24452464
Whether to load detailed metadata that requires opening the dataset.
@@ -3331,10 +3350,11 @@ components:
33313350
type: integer
33323351
nullable: true
33333352
include_declared:
3353+
default: true
33343354
description: |
3335-
When true, includes tables that have been declared in the namespace
3355+
When true (default), includes tables that have been declared in the namespace
33363356
but not yet created on storage, in addition to tables that have
3337-
been created. When false or not set, only tables with storage
3357+
been created. When false, only tables with storage
33383358
components are returned.
33393359
type: boolean
33403360
ListTablesResponse:

java/lance-namespace-apache-client/docs/ListTablesRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|**id** | **List&lt;String&gt;** | | [optional] |
1313
|**pageToken** | **String** | An opaque token that allows pagination for list operations (e.g. ListNamespaces). For an initial request of a list operation, if the implementation cannot return all items in one response, or if there are more items than the page limit specified in the request, the implementation must return a page token in the response, indicating there are more results available. After the initial request, the value of the page token from each response must be used as the page token value for the next request. Caller must interpret either &#x60;null&#x60;, missing value or empty string value of the page token from the implementation&#39;s response as the end of the listing results. | [optional] |
1414
|**limit** | **Integer** | An inclusive upper bound of the number of results that a caller will receive. | [optional] |
15-
|**includeDeclared** | **Boolean** | When true, includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false or not set, only tables with storage components are returned. | [optional] |
15+
|**includeDeclared** | **Boolean** | When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned. | [optional] |
1616

1717

1818

java/lance-namespace-apache-client/docs/MetadataApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,11 +2611,11 @@ public class Example {
26112611

26122612
## listTables
26132613

2614-
> ListTablesResponse listTables(id, delimiter, pageToken, limit)
2614+
> ListTablesResponse listTables(id, delimiter, pageToken, limit, includeDeclared)
26152615
26162616
List tables in a namespace
26172617

2618-
List all child table names of the parent namespace &#x60;id&#x60;. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the &#x60;ListTablesRequest&#x60; information in the following way: - &#x60;id&#x60;: pass through path parameter of the same name - &#x60;page_token&#x60;: pass through query parameter of the same name - &#x60;limit&#x60;: pass through query parameter of the same name
2618+
List all child table names of the parent namespace &#x60;id&#x60;. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the &#x60;ListTablesRequest&#x60; information in the following way: - &#x60;id&#x60;: pass through path parameter of the same name - &#x60;page_token&#x60;: pass through query parameter of the same name - &#x60;limit&#x60;: pass through query parameter of the same name - &#x60;include_declared&#x60;: pass through query parameter of the same name
26192619

26202620
### Example
26212621

@@ -2652,8 +2652,9 @@ public class Example {
26522652
String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `$` delimiter must be used.
26532653
String pageToken = "pageToken_example"; // String | Pagination token from a previous request
26542654
Integer limit = 56; // Integer | Maximum number of items to return
2655+
Boolean includeDeclared = true; // Boolean | When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned.
26552656
try {
2656-
ListTablesResponse result = apiInstance.listTables(id, delimiter, pageToken, limit);
2657+
ListTablesResponse result = apiInstance.listTables(id, delimiter, pageToken, limit, includeDeclared);
26572658
System.out.println(result);
26582659
} catch (ApiException e) {
26592660
System.err.println("Exception when calling MetadataApi#listTables");
@@ -2675,6 +2676,7 @@ public class Example {
26752676
| **delimiter** | **String**| An optional delimiter of the &#x60;string identifier&#x60;, following the Lance Namespace spec. When not specified, the &#x60;$&#x60; delimiter must be used. | [optional] |
26762677
| **pageToken** | **String**| Pagination token from a previous request | [optional] |
26772678
| **limit** | **Integer**| Maximum number of items to return | [optional] |
2679+
| **includeDeclared** | **Boolean**| When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned. | [optional] [default to true] |
26782680

26792681
### Return type
26802682

java/lance-namespace-apache-client/docs/NamespaceApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,11 @@ public class Example {
385385

386386
## listTables
387387

388-
> ListTablesResponse listTables(id, delimiter, pageToken, limit)
388+
> ListTablesResponse listTables(id, delimiter, pageToken, limit, includeDeclared)
389389
390390
List tables in a namespace
391391

392-
List all child table names of the parent namespace &#x60;id&#x60;. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the &#x60;ListTablesRequest&#x60; information in the following way: - &#x60;id&#x60;: pass through path parameter of the same name - &#x60;page_token&#x60;: pass through query parameter of the same name - &#x60;limit&#x60;: pass through query parameter of the same name
392+
List all child table names of the parent namespace &#x60;id&#x60;. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the &#x60;ListTablesRequest&#x60; information in the following way: - &#x60;id&#x60;: pass through path parameter of the same name - &#x60;page_token&#x60;: pass through query parameter of the same name - &#x60;limit&#x60;: pass through query parameter of the same name - &#x60;include_declared&#x60;: pass through query parameter of the same name
393393

394394
### Example
395395

@@ -426,8 +426,9 @@ public class Example {
426426
String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `$` delimiter must be used.
427427
String pageToken = "pageToken_example"; // String | Pagination token from a previous request
428428
Integer limit = 56; // Integer | Maximum number of items to return
429+
Boolean includeDeclared = true; // Boolean | When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned.
429430
try {
430-
ListTablesResponse result = apiInstance.listTables(id, delimiter, pageToken, limit);
431+
ListTablesResponse result = apiInstance.listTables(id, delimiter, pageToken, limit, includeDeclared);
431432
System.out.println(result);
432433
} catch (ApiException e) {
433434
System.err.println("Exception when calling NamespaceApi#listTables");
@@ -449,6 +450,7 @@ public class Example {
449450
| **delimiter** | **String**| An optional delimiter of the &#x60;string identifier&#x60;, following the Lance Namespace spec. When not specified, the &#x60;$&#x60; delimiter must be used. | [optional] |
450451
| **pageToken** | **String**| Pagination token from a previous request | [optional] |
451452
| **limit** | **Integer**| Maximum number of items to return | [optional] |
453+
| **includeDeclared** | **Boolean**| When true (default), includes tables that have been declared in the namespace but not yet created on storage, in addition to tables that have been created. When false, only tables with storage components are returned. | [optional] [default to true] |
452454

453455
### Return type
454456

0 commit comments

Comments
 (0)