diff --git a/src/duckdb/generated_extension_loader_package_build.cpp b/src/duckdb/generated_extension_loader_package_build.cpp index eb06bc9d5..2f0b25bc0 100644 --- a/src/duckdb/generated_extension_loader_package_build.cpp +++ b/src/duckdb/generated_extension_loader_package_build.cpp @@ -45,7 +45,7 @@ int32_t duckdb_extension_core_functions_describe(duckdb_extension_descriptor *de descriptor->version = 1; descriptor->name = "core_functions"; descriptor->extension_version = EXT_VERSION_CORE_FUNCTIONS; - descriptor->api_version = "v2.0.1-alpha54043"; + descriptor->api_version = "v2.0.1-alpha54527"; descriptor->entry_cpp = (void (*)(void))core_functions_duckdb_cpp_init; return 0; } @@ -78,7 +78,7 @@ int32_t duckdb_extension_parquet_describe(duckdb_extension_descriptor *descripto descriptor->version = 1; descriptor->name = "parquet"; descriptor->extension_version = EXT_VERSION_PARQUET; - descriptor->api_version = "v2.0.1-alpha54043"; + descriptor->api_version = "v2.0.1-alpha54527"; descriptor->entry_cpp = (void (*)(void))parquet_duckdb_cpp_init; return 0; } @@ -111,7 +111,7 @@ int32_t duckdb_extension_icu_describe(duckdb_extension_descriptor *descriptor) { descriptor->version = 1; descriptor->name = "icu"; descriptor->extension_version = EXT_VERSION_ICU; - descriptor->api_version = "v2.0.1-alpha54043"; + descriptor->api_version = "v2.0.1-alpha54527"; descriptor->entry_cpp = (void (*)(void))icu_duckdb_cpp_init; return 0; } @@ -144,7 +144,7 @@ int32_t duckdb_extension_json_describe(duckdb_extension_descriptor *descriptor) descriptor->version = 1; descriptor->name = "json"; descriptor->extension_version = EXT_VERSION_JSON; - descriptor->api_version = "v2.0.1-alpha54043"; + descriptor->api_version = "v2.0.1-alpha54527"; descriptor->entry_cpp = (void (*)(void))json_duckdb_cpp_init; return 0; } diff --git a/src/duckdb/src/common/types/column/column_data_collection.cpp b/src/duckdb/src/common/types/column/column_data_collection.cpp index 9777aa5e9..754c8e4e5 100644 --- a/src/duckdb/src/common/types/column/column_data_collection.cpp +++ b/src/duckdb/src/common/types/column/column_data_collection.cpp @@ -1066,8 +1066,10 @@ void ColumnDataCollection::Append(ColumnDataAppendState &state, DataChunk &input for (idx_t vector_idx = 0; vector_idx < types.size(); vector_idx++) { ColumnDataMetaData meta_data(copy_functions[vector_idx], segment, state, chunk_data, chunk_data.vector_data[vector_idx]); + const auto allocated_before = segment.total_allocated; copy_functions[vector_idx].function(meta_data, state.vector_data[vector_idx], input.data[vector_idx], offset, append_amount); + chunk_data.allocation_sizes[vector_idx] += segment.total_allocated - allocated_before; } chunk_data.count += append_amount; } @@ -1320,6 +1322,10 @@ idx_t ColumnDataChunkCursor::AllocationSize() const { return collection.GetSegments()[position.segment_index]->GetChunkAllocationSize(position.chunk_index); } +idx_t ColumnDataChunkCursor::AllocationSize(const vector &column_ids) const { + return collection.GetSegments()[position.segment_index]->GetChunkAllocationSize(position.chunk_index, column_ids); +} + ColumnDataRowCollection ColumnDataCollection::GetRows() const { return ColumnDataRowCollection(*this); } diff --git a/src/duckdb/src/common/types/column/column_data_collection_segment.cpp b/src/duckdb/src/common/types/column/column_data_collection_segment.cpp index 3417f0e91..ec2def13f 100644 --- a/src/duckdb/src/common/types/column/column_data_collection_segment.cpp +++ b/src/duckdb/src/common/types/column/column_data_collection_segment.cpp @@ -140,9 +140,12 @@ void ColumnDataCollectionSegment::AllocateNewChunk() { ChunkMetaData meta_data; meta_data.count = 0; meta_data.vector_data.reserve(types.size()); + meta_data.allocation_sizes.reserve(types.size()); for (idx_t i = 0; i < types.size(); i++) { + const auto allocated_before = total_allocated; auto vector_idx = AllocateVector(types[i], meta_data); meta_data.vector_data.push_back(vector_idx); + meta_data.allocation_sizes.push_back(total_allocated - allocated_before); } chunk_data.push_back(std::move(meta_data)); } @@ -323,6 +326,16 @@ idx_t ColumnDataCollectionSegment::GetChunkAllocationSize(const idx_t chunk_idx) return total_allocated - last_chunk_total_allocated; } +idx_t ColumnDataCollectionSegment::GetChunkAllocationSize(const idx_t chunk_idx, + const vector &column_ids) const { + const auto &allocation_sizes = chunk_data[chunk_idx].allocation_sizes; + idx_t result = 0; + for (const auto &column_id : column_ids) { + result += allocation_sizes[column_id]; + } + return result; +} + void ColumnDataCollectionSegment::FetchChunk(idx_t chunk_idx, DataChunk &result) { vector column_ids; column_ids.reserve(types.size()); @@ -344,6 +357,11 @@ void ColumnDataCollectionSegment::Verify() { idx_t total_count = 0; for (idx_t i = 0; i < chunk_data.size(); i++) { total_count += chunk_data[i].count; + idx_t allocation_size = 0; + for (const auto &column_size : chunk_data[i].allocation_sizes) { + allocation_size += column_size; + } + D_ASSERT(allocation_size == GetChunkAllocationSize(i)); } D_ASSERT(total_count == this->count); #endif diff --git a/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp b/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp index 3bb694a25..7e3e525e3 100644 --- a/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +++ b/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp @@ -1240,11 +1240,11 @@ class PartitionedCopyGroupCursor { virtual PartitionedCopyChunkPosition Position() const = 0; //! The number of rows in the current chunk virtual idx_t Count() const = 0; - //! An estimate of the bytes the rows of the current chunk take when written + //! An estimate of the bytes the written columns of the current chunk take virtual idx_t ByteEstimate() const = 0; //! The row offsets within the current chunk at which a new partition key starts (none in a single-key group) virtual void PartitionBoundaries(vector &boundaries) const = 0; - //! The byte size of every row of the current chunk (may pin and read the chunk) + //! The byte size of every written row of the current chunk (may pin and read the chunk) virtual void RowSizes(vector &sizes) = 0; }; @@ -1266,7 +1266,7 @@ class PartitionedCopyGroup { virtual void FinishPreparation(idx_t step) = 0; //! Chunk access, valid after the preparation steps: a cursor over the chunks, and scans from a chunk on - virtual unique_ptr InitializeCursor() const = 0; + virtual unique_ptr InitializeCursor(const CopyBatchSlicer &slicer) const = 0; virtual unique_ptr InitializeScan(const PartitionedCopyChunkPosition &position) const = 0; virtual void InitializeScanChunk(DataChunk &chunk) const = 0; @@ -2195,8 +2195,7 @@ class SortedBinGroup : public PartitionedCopyGroup { ColumnDataScanState state; }; - //! Walks the chunks of the materialized collection through the column data cursor; rows are sized by scanning - //! the chunk and computing the sizes of its written columns + //! Walks the chunks of the materialized collection through the column data cursor class Cursor : public PartitionedCopyGroupCursor { public: explicit Cursor(const SortedBinGroup &group) : group(group), cursor(*group.collection) { @@ -2214,7 +2213,7 @@ class SortedBinGroup : public PartitionedCopyGroup { return cursor.Count(); } idx_t ByteEstimate() const override { - return cursor.AllocationSize(); + return cursor.AllocationSize(group.input.partitioned_copy.write_columns); } void PartitionBoundaries(vector &boundaries) const override { group.PartitionBoundaries(cursor.Position().row_offset, Count(), boundaries); @@ -2247,7 +2246,7 @@ class SortedBinGroup : public PartitionedCopyGroup { idx_t end_block) override; void FinishPreparation(idx_t step) override; - unique_ptr InitializeCursor() const override { + unique_ptr InitializeCursor(const CopyBatchSlicer &) const override { return make_uniq(*this); } unique_ptr @@ -2624,13 +2623,13 @@ class DirectPartitionGroup : public PartitionedCopyGroup { TupleDataScanState state; }; - //! Walks the tuple chunks: the byte estimate is the row width plus the heap bytes the storage accounts for, and - //! the row sizes come from the stored per-row heap sizes + //! Walks the tuple chunks without gathering their values class Cursor : public PartitionedCopyGroupCursor { public: - explicit Cursor(TupleDataCollection &data_p) - : data(data_p), cursor(data_p), row_width(data_p.GetLayout().GetRowWidth()), - has_heap(!data_p.GetLayout().AllConstant()) { + Cursor(const DirectPartitionGroup &group, const CopyBatchSlicer &slicer) + : data(*group.data), cursor(data), fixed_row_bytes(slicer.GetFixedRowBytes()), + omitted_heap_bytes(slicer.FixedRowSize().IsValid() ? 0 : group.OmittedHeapBytes()), + has_heap(!data.GetLayout().AllConstant()) { } public: @@ -2650,7 +2649,10 @@ class DirectPartitionGroup : public PartitionedCopyGroup { return cursor.Count(); } idx_t ByteEstimate() const override { - return cursor.Count() * row_width + cursor.HeapSize(); + const auto heap_bytes = cursor.HeapSize(); + // Clamp before multiplying so an estimated key size cannot overflow or underflow the heap total. + const auto omitted_bytes = MinValue(omitted_heap_bytes, heap_bytes / Count()) * Count(); + return fixed_row_bytes * Count() + heap_bytes - omitted_bytes; } void PartitionBoundaries(vector &boundaries) const override { // a single key: no boundaries @@ -2660,16 +2662,18 @@ class DirectPartitionGroup : public PartitionedCopyGroup { private: TupleDataCollection &data; TupleDataChunkCursor cursor; - const idx_t row_width; + const idx_t fixed_row_bytes; + const idx_t omitted_heap_bytes; const bool has_heap; idx_t row_offset = 0; bool started = false; }; public: - DirectPartitionGroup(ClientContext &context, unique_ptr data_p, + DirectPartitionGroup(const PartitionedCopy &partitioned_copy, unique_ptr data_p, vector column_ids_p = {}) - : context(context), data(std::move(data_p)), count(data->Count()), column_ids(std::move(column_ids_p)) { + : partitioned_copy(partitioned_copy), data(std::move(data_p)), count(data->Count()), + column_ids(std::move(column_ids_p)) { if (column_ids.empty()) { const auto column_count = data->GetLayout().ColumnCount(); for (column_t col_idx = 0; col_idx < column_count; col_idx++) { @@ -2695,18 +2699,21 @@ class DirectPartitionGroup : public PartitionedCopyGroup { throw InternalException("DirectPartitionGroup has no preparation steps"); } - unique_ptr InitializeCursor() const override { - return make_uniq(*data); + unique_ptr InitializeCursor(const CopyBatchSlicer &slicer) const override { + return make_uniq(*this, slicer); } unique_ptr InitializeScan(const PartitionedCopyChunkPosition &position) const override; void InitializeScanChunk(DataChunk &chunk) const override { - chunk.Initialize(Allocator::Get(context), scan_types); + chunk.Initialize(Allocator::Get(partitioned_copy.context), scan_types); } bool Scan(PartitionedCopyGroupScanState &state, DataChunk &chunk) const override; private: - ClientContext &context; + idx_t OmittedHeapBytes() const; + +private: + const PartitionedCopy &partitioned_copy; unique_ptr data; const idx_t count; //! The columns read from the tuples, and their types @@ -2736,8 +2743,8 @@ class OverflowSortGroup : public PartitionedCopyGroup { idx_t end_block) override; void FinishPreparation(idx_t step) override; - unique_ptr InitializeCursor() const override { - return sorted->InitializeCursor(); + unique_ptr InitializeCursor(const CopyBatchSlicer &slicer) const override { + return sorted->InitializeCursor(slicer); } unique_ptr InitializeScan(const PartitionedCopyChunkPosition &position) const override { @@ -2852,26 +2859,57 @@ vector> IntegerPartitionInput::Finalize(ClientC if (partition_idx == overflow_idx) { groups.push_back(make_uniq(*this, context, std::move(partition))); } else { - groups.push_back(make_uniq(context, std::move(partition))); + groups.push_back(make_uniq(partitioned_copy, std::move(partition))); } } return groups; } +idx_t DirectPartitionGroup::OmittedHeapBytes() const { + const auto &op = partitioned_copy.op; + if (!op.batch_size_bytes.IsValid() || op.write_partition_columns) { + return 0; + } + vector omitted_columns; + const auto &variable_columns = data->GetLayout().GetVariableColumns(); + for (const auto &partition_column : op.partition_columns) { + const auto column_id = column_ids[partition_column]; + if (std::find(variable_columns.begin(), variable_columns.end(), column_id) != variable_columns.end()) { + omitted_columns.push_back(column_id); + } + } + if (omitted_columns.empty()) { + return 0; + } + + // Every row has the same partition key. Gather its variable columns once. + TupleDataChunkIterator iterator(*data, TupleDataPinProperties::UNPIN_AFTER_DONE, {0, 0}, true); + DataChunk key_chunk; + data->InitializeChunk(key_chunk, omitted_columns); + auto &chunk_state = iterator.GetChunkState(); + const auto &selection = *FlatVector::IncrementalSelectionVector(); + for (idx_t i = 0; i < omitted_columns.size(); i++) { + data->Gather(chunk_state.row_locations, selection, 1, omitted_columns[i], key_chunk.data[i], selection, + nullptr); + } + key_chunk.SetChildCardinality(1); + CopyBatchSlicer slicer(key_chunk.GetTypes(), op.batch_size_bytes); + return slicer.ComputeRowSizes(key_chunk).Values()[0].GetValue() - slicer.GetFixedRowBytes(); +} + void DirectPartitionGroup::Cursor::RowSizes(vector &sizes) { const auto chunk_rows = cursor.Count(); - sizes.assign(chunk_rows, row_width); + sizes.assign(chunk_rows, fixed_row_bytes); if (!has_heap) { return; } - // the stored per-row heap sizes, through the tuple iterator: no values are gathered TupleDataChunkIterator iterator(data, TupleDataPinProperties::UNPIN_AFTER_DONE, cursor.Position(), true); if (iterator.GetCurrentChunkCount() != chunk_rows) { throw InternalException("Partitioned copy could not read a chunk to size its rows"); } const auto heap_sizes = iterator.GetHeapSizes(); for (idx_t row = 0; row < chunk_rows; row++) { - sizes[row] += heap_sizes[row]; + sizes[row] += heap_sizes[row] - MinValue(heap_sizes[row], omitted_heap_bytes); } } @@ -2980,7 +3018,7 @@ vector> SortStrategyInput::Finalize(ClientConte // a bin proven to hold a single key is read straight from its tuple data, like a direct partition auto single_key = strategy->TryTakeSinglePartition(bin, *gstate.source); if (single_key) { - groups[bin] = make_uniq(context, std::move(single_key), strategy->scan_ids); + groups[bin] = make_uniq(partitioned_copy, std::move(single_key), strategy->scan_ids); } else { groups[bin] = make_uniq(*this, gstate, vector {bin}, chunk_rows[bin].count); } @@ -3173,9 +3211,9 @@ void PartitionedCopyHashGroup::AddPlannedBatch(idx_t batch_state_idx, Partitione planned_batches.push_back(batch); } -//! Plans the batches of the group: one partition per batch, split by the row and byte limits of the COPY. Rows are -//! added by the chunk estimates until a run would cross the byte limit; from then on the chunk's exact row sizes are -//! used. Both limits go through the batch analyzer: like the Parquet writer and the delayed partition path, a batch +//! Plans the batches of the group: one partition per batch, split by the row and byte limits of the COPY. Cached +//! written-column estimates are refined near byte boundaries. Fixed-width rows need no scan. Both limits go through +//! the batch analyzer: like the Parquet writer and the delayed partition path, a batch //! is closed once it reaches a limit, so it may exceed the row limit by less than one input vector. void PartitionedCopyHashGroup::Plan() { const auto &op = partitioned_copy.op; @@ -3206,7 +3244,9 @@ void PartitionedCopyHashGroup::Plan() { vector boundaries; vector row_sizes; - auto cursor = group->InitializeCursor(); + CopyBatchSlicer slicer(partitioned_copy.write_types, batch_size_bytes); + const auto fixed_row_size = slicer.FixedRowSize(); + auto cursor = group->InitializeCursor(slicer); while (cursor->Next()) { const auto position = cursor->Position(); const auto chunk_rows = cursor->Count(); @@ -3217,7 +3257,9 @@ void PartitionedCopyHashGroup::Plan() { begin = {position, 0}; begin_at_next_chunk = false; } - const auto chunk_bytes = cursor->ByteEstimate(); + const auto chunk_bytes = fixed_row_size.IsValid() ? chunk_rows * fixed_row_size.GetIndex() + : batch_size_bytes.IsValid() ? cursor->ByteEstimate() + : 0; boundaries.clear(); cursor->PartitionBoundaries(boundaries); boundaries.push_back(chunk_rows); @@ -3234,16 +3276,20 @@ void PartitionedCopyHashGroup::Plan() { idx_t run_rows = boundary - row; if (!sized && batch_size_bytes.IsValid() && run_rows > 1 && batch_bytes + chunk_bytes * run_rows / chunk_rows >= batch_size_bytes.GetIndex()) { - // the run would cross the byte limit: use the exact row sizes for the rest of this chunk - cursor->RowSizes(row_sizes); - if (row_sizes.size() != chunk_rows) { - throw InternalException("Partitioned copy sized %llu rows of a chunk of %llu rows", - row_sizes.size(), chunk_rows); + // The run would cross the byte limit. Refine the remaining rows of this chunk. + if (fixed_row_size.IsValid()) { + row_sizes.assign(chunk_rows, fixed_row_size.GetIndex()); + } else { + cursor->RowSizes(row_sizes); + if (row_sizes.size() != chunk_rows) { + throw InternalException("Partitioned copy sized %llu rows of a chunk of %llu rows", + row_sizes.size(), chunk_rows); + } } sized = true; } if (sized) { - // take rows by their exact size until a limit is reached + // take rows by their refined size until a limit is reached while (run_rows) { batch_bytes += row_sizes[row++]; ++batch_rows; diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 759ffdc9f..129c5194c 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "1-alpha54043" +#define DUCKDB_PATCH_VERSION "1-alpha54527" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 0 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 2 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v2.0.1-alpha54043" +#define DUCKDB_VERSION "v2.0.1-alpha54527" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "29b26cb106" +#define DUCKDB_SOURCE_ID "a7e6fc10d2" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp b/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp index 837db1748..9944471d2 100644 --- a/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +++ b/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp @@ -234,6 +234,8 @@ class ColumnDataChunkCursor { idx_t Count() const; //! The allocated bytes of the current chunk idx_t AllocationSize() const; + //! The allocated bytes of selected columns of the current chunk + idx_t AllocationSize(const vector &column_ids) const; private: const ColumnDataCollection &collection; diff --git a/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_segment.hpp b/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_segment.hpp index 22a52980a..0dce46a9b 100644 --- a/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_segment.hpp +++ b/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_segment.hpp @@ -78,6 +78,8 @@ struct VectorMetaData { struct ChunkMetaData { //! The set of vectors of the chunk vector vector_data; + //! Allocated bytes per column, including its child vectors and buffer-managed string heaps + vector allocation_sizes; //! The block ids referenced by the chunk unordered_set block_ids; //! The number of entries in the chunk @@ -147,6 +149,8 @@ class ColumnDataCollectionSegment { idx_t AllocationSize() const; //! Get the allocation size of the chunk idx_t GetChunkAllocationSize(idx_t chunk_index) const; + //! Get the allocation size of selected columns of the chunk + idx_t GetChunkAllocationSize(idx_t chunk_index, const vector &column_ids) const; void FetchChunk(idx_t chunk_idx, DataChunk &result); void FetchChunk(idx_t chunk_idx, DataChunk &result, const vector &column_ids); diff --git a/src/duckdb/src/include/duckdb/execution/operator/persistent/copy_batch_slicer.hpp b/src/duckdb/src/include/duckdb/execution/operator/persistent/copy_batch_slicer.hpp index 4f11d55e0..98eb2fcbb 100644 --- a/src/duckdb/src/include/duckdb/execution/operator/persistent/copy_batch_slicer.hpp +++ b/src/duckdb/src/include/duckdb/execution/operator/persistent/copy_batch_slicer.hpp @@ -23,6 +23,14 @@ class CopyBatchSlicer { ~CopyBatchSlicer(); public: + //! The fixed-width contribution, excluding tuple headers and variable payloads. + idx_t GetFixedRowBytes() const { + return fixed_row_bytes; + } + //! Fixed bytes per written row, when sizing needs no values from the input. + optional_idx FixedRowSize() const { + return batch_size_bytes.IsValid() && layout.AllConstant() ? optional_idx(fixed_row_bytes) : optional_idx(); + } //! Computes row sizes, including fixed-width values and variable payloads. const Vector &ComputeRowSizes(DataChunk &chunk); //! Returns the next slice and advances offset, reusing row sizes until the chunk is exhausted. diff --git a/src/duckdb/src/include/duckdb/main/extension_entries.hpp b/src/duckdb/src/include/duckdb/main/extension_entries.hpp index 569b24b67..211d5e9a8 100644 --- a/src/duckdb/src/include/duckdb/main/extension_entries.hpp +++ b/src/duckdb/src/include/duckdb/main/extension_entries.hpp @@ -58,7 +58,14 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = { {"__aws__cloudformation__quack_on_ec2__create", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, {"__aws__cloudformation__quack_on_ec2__destroy", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, {"__aws__cloudformation__quack_on_ec2__list", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__cloudformation__quack_on_ec2__resolve", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, {"__aws__cloudformation__quack_on_ec2__status", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__expired", "aws", CatalogType::SCALAR_FUNCTION_ENTRY}, + {"__aws__s3tables__table_bucket__create", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__s3tables__table_bucket__destroy", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__s3tables__table_bucket__list", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__s3tables__table_bucket__resolve", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"__aws__s3tables__table_bucket__status", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, {"__internal_json_copy_to_geojson", "json", CatalogType::SCALAR_FUNCTION_ENTRY}, {"__internal_json_copy_to_json", "json", CatalogType::SCALAR_FUNCTION_ENTRY}, {"abs", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY}, @@ -796,6 +803,13 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = { {"rtree_index_dump", "spatial", CatalogType::TABLE_FUNCTION_ENTRY}, {"rtree_index_scan", "spatial", CatalogType::TABLE_FUNCTION_ENTRY}, {"rtrim", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY}, + {"s3tables_create_table_bucket", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_delete_table_bucket", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_get_table_bucket", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_namespaces", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_table_bucket_tags", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_table_buckets", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, + {"s3tables_tables", "aws", CatalogType::TABLE_FUNCTION_ENTRY}, {"scan_data_from_quack_client", "quack", CatalogType::TABLE_FUNCTION_ENTRY}, {"sem", "core_functions", CatalogType::AGGREGATE_FUNCTION_ENTRY}, {"set_bit", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY}, @@ -1540,6 +1554,7 @@ static constexpr ExtensionEntry EXTENSION_SECRET_TYPES[] = { // Resource types registered by extensions: CREATE/REGISTER EXTERNAL RESOURCE '' autoloads the extension static constexpr ExtensionEntry EXTENSION_EXTERNAL_RESOURCE_TYPES[] = { {"aws:cloudformation:quack-on-ec2", "aws"}, + {"aws:s3tables:table-bucket", "aws"}, }; // END_OF_EXTENSION_EXTERNAL_RESOURCE_TYPES // Note: these are currently hardcoded in scripts/generate_extensions_function.py