-
Notifications
You must be signed in to change notification settings - Fork 72
Reduce calls to GetTableMetadata endpoint; Never search catalog for Function entries #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Tmonster
merged 8 commits into
duckdb:main
from
Tmonster:do_not_lookup_functions_in_iceberg
Sep 15, 2025
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
98c7f4d
reduce calls to show all tables
Tmonster b9a58bd
ff
Tmonster d1656ed
fix test
Tmonster e288406
PR comments. more tests
Tmonster eb307d4
rename file
Tmonster e576e90
use dummy entry for table listing
Tmonster 4895175
Merge remote-tracking branch 'upstream/main' into do_not_lookup_funct…
Tmonster dc4b0f0
fix show all tables
Tmonster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
test/sql/local/irc/test_table_information_requests.test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # name: test/sql/local/irc/test_table_information_requests.test | ||
| # description: test integration with iceberg catalog read | ||
| # group: [irc] | ||
|
|
||
| require-env ICEBERG_SERVER_AVAILABLE | ||
|
|
||
| require avro | ||
|
|
||
| require parquet | ||
|
|
||
| require iceberg | ||
|
|
||
| require httpfs | ||
|
|
||
| # Do not ignore 'HTTP' error messages! | ||
| set ignore_error_messages | ||
|
|
||
| statement ok | ||
| set enable_logging=true | ||
|
|
||
| statement ok | ||
| set logging_level='debug' | ||
|
|
||
| statement ok | ||
| CALL enable_logging('HTTP'); | ||
|
|
||
| statement ok | ||
| CREATE SECRET ( | ||
| TYPE S3, | ||
| KEY_ID 'admin', | ||
| SECRET 'password', | ||
| ENDPOINT '127.0.0.1:9000', | ||
| URL_STYLE 'path', | ||
| USE_SSL 0 | ||
| ); | ||
|
|
||
|
|
||
| statement ok | ||
| ATTACH '' AS my_datalake ( | ||
| TYPE ICEBERG, | ||
| CLIENT_ID 'admin', | ||
| CLIENT_SECRET 'password', | ||
| ENDPOINT 'http://127.0.0.1:8181' | ||
| ); | ||
|
|
||
| statement ok | ||
| show all tables; | ||
|
|
||
| # 1 call for oath, 1 call for config | ||
| # 1 call to list namespaces | ||
| # 1 call to list tables in default | ||
| # 1 call to list tables in level1 namespace (no recursive namespace calls) | ||
| query I | ||
| select count(*) from duckdb_logs_parsed('HTTP'); | ||
| ---- | ||
| 5 | ||
|
|
||
| statement ok | ||
| call truncate_duckdb_logs(); | ||
|
|
||
| query II | ||
| select column_name, column_type from (describe my_datalake.default.supplier); | ||
| ---- | ||
| s_suppkey BIGINT | ||
| s_name VARCHAR | ||
| s_address VARCHAR | ||
| s_nationkey INTEGER | ||
| s_phone VARCHAR | ||
| s_acctbal DECIMAL(15,2) | ||
| s_comment VARCHAR | ||
|
|
||
| # one request to verify the default schema | ||
| # another request to verify table default.supplier | ||
| # another request to the table information endpoint | ||
| # FIXME: apparantly there is also a request to an avro file | ||
| query I | ||
| select count(*) from duckdb_logs_parsed('HTTP'); | ||
| ---- | ||
| 4 | ||
|
|
||
| statement ok | ||
| begin; | ||
|
|
||
| statement ok | ||
| show all tables; | ||
|
|
||
| query I | ||
| select distinct(s_nationkey) from my_datalake.default.supplier order by all limit 5; | ||
| ---- | ||
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
|
|
||
| statement ok | ||
| commit; | ||
|
|
||
| # 5 calls to list the namespaces | ||
| # 1 call the the GetTableInformationEndpoint for supploer | ||
| # (FIXME) 1 call to an avro file in the warehouse | ||
| # 1 call to the manifest file | ||
| # 1 call to the manifest list | ||
| # 2 calls to read parquet files | ||
| query I | ||
| select count(*) from duckdb_logs_parsed('HTTP'); | ||
| ---- | ||
| 11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # name: test/sql/local/test_iceberg_and_ducklake.test | ||
| # description: test integration with iceberg catalog read | ||
| # group: [local] | ||
|
|
||
| require-env ICEBERG_SERVER_AVAILABLE | ||
|
|
||
| require avro | ||
|
|
||
| require parquet | ||
|
|
||
| require iceberg | ||
|
|
||
| require httpfs | ||
|
|
||
| require ducklake | ||
|
|
||
| # Do not ignore 'HTTP' error messages! | ||
| set ignore_error_messages | ||
|
|
||
| statement ok | ||
| pragma threads=1; | ||
|
|
||
| statement ok | ||
| CALL enable_logging('HTTP'); | ||
|
|
||
| statement ok | ||
| set logging_level='debug'; | ||
|
|
||
| statement ok | ||
| CREATE SECRET ( | ||
| TYPE S3, | ||
| KEY_ID 'admin', | ||
| SECRET 'password', | ||
| ENDPOINT '127.0.0.1:9000', | ||
| URL_STYLE 'path', | ||
| USE_SSL 0 | ||
| ); | ||
|
|
||
|
|
||
| statement ok | ||
| ATTACH '' AS my_datalake ( | ||
| TYPE ICEBERG, | ||
| CLIENT_ID 'admin', | ||
| CLIENT_SECRET 'password', | ||
| ENDPOINT 'http://127.0.0.1:8181' | ||
| ); | ||
|
|
||
| statement ok | ||
| ATTACH 'ducklake:duckdb:__TEST_DIR__/ducklake.duckdb' as my_ducklake (DATA_PATH '__TEST_DIR__/data_path'); | ||
|
|
||
| # 2 requests to the iceberg catalog for oauth and config | ||
| # 3 requests when attaching ducklake because a ducklake attach calls from duckdb_tables() | ||
| query I | ||
| select count(*) from duckdb_logs_parsed('HTTP'); | ||
| ---- | ||
| 5 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.