MCPcopy Create free account
hub / github.com/PostHog/duckgres / createS3SecretWith

Function createS3SecretWith

server/server.go:1982–2024  ·  view source on GitHub ↗

createS3SecretWith is createS3Secret over an attachSQLRunner so the catalog-attachment paths can run the secret check + CREATE SECRET under per-step deadlines via attachStepExecer.

(db attachSQLRunner, dlCfg DuckLakeConfig)

Source from the content-addressed store, hash-verified

1980var duckLakeMetadataIndexes = []duckLakeMetadataIndex{
1981 // Critical: ducklake_file_column_stats is often the largest table (millions of rows).
1982 // Filter pushdown CTEs query by (table_id, column_id) on every query.
1983 {
1984 name: "idx_ducklake_file_col_stats_tbl_col",
1985 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_file_col_stats_tbl_col ON ducklake_file_column_stats (table_id, column_id)",
1986 },
1987 // Catalog loading queries (GetCatalogForSnapshot) filter by snapshot ranges.
1988 {
1989 name: "idx_ducklake_tag_object_snap",
1990 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_tag_object_snap ON ducklake_tag (object_id, begin_snapshot, end_snapshot)",
1991 },
1992 {
1993 name: "idx_ducklake_col_tag_tbl_col_snap",
1994 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_col_tag_tbl_col_snap ON ducklake_column_tag (table_id, column_id, begin_snapshot, end_snapshot)",
1995 },
1996 {
1997 name: "idx_ducklake_table_snap",
1998 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_table_snap ON ducklake_table (begin_snapshot, end_snapshot)",
1999 },
2000 {
2001 name: "idx_ducklake_column_tbl_snap",
2002 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_column_tbl_snap ON ducklake_column (table_id, begin_snapshot, end_snapshot, column_order)",
2003 },
2004 // File and stats queries.
2005 {
2006 name: "idx_ducklake_data_file_tbl_snap",
2007 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_data_file_tbl_snap ON ducklake_data_file (table_id, begin_snapshot, end_snapshot)",
2008 },
2009 // Per-file and table-scoped per-file reads of the stats/partition side
2010 // tables. Those tables have no index at all in the stock DuckLake schema,
2011 // so per-snapshot file listings seq-scan them once they grow (measured:
2012 // minutes per listing on a shared catalog with ~10^8 stats rows). The
2013 // (table_id, data_file_id) composites serve `WHERE table_id = ? AND
2014 // data_file_id IN (...)` fetches; the solo data_file_id indexes serve
2015 // per-file lookups.
2016 {
2017 name: "idx_ducklake_file_col_stats_file",
2018 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_file_col_stats_file ON ducklake_file_column_stats (data_file_id)",
2019 },
2020 {
2021 name: "idx_ducklake_file_col_stats_tbl_file",
2022 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_file_col_stats_tbl_file ON ducklake_file_column_stats (table_id, data_file_id)",
2023 },
2024 {
2025 name: "idx_ducklake_file_part_val_file",
2026 stmt: "CREATE INDEX IF NOT EXISTS idx_ducklake_file_part_val_file ON ducklake_file_partition_value (data_file_id)",
2027 },

Callers 3

AttachDuckLakeFunction · 0.85
AttachDeltaCatalogFunction · 0.85
createS3SecretFunction · 0.85

Calls 6

S3ProviderForConfigFunction · 0.85
buildAWSSdkSecretFunction · 0.85
buildConfigSecretFunction · 0.85
queryRowScanMethod · 0.65
ExecMethod · 0.65

Tested by

no test coverage detected