Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ void PrimitiveColumnWriter::Prepare(ColumnWriterState &state_p, ColumnWriterStat
}
if (validity.RowIsValid(vector_index)) {
page_info.estimated_page_size += GetRowSize(vector, vector_index, state);
if (page_info.estimated_page_size >= MAX_UNCOMPRESSED_PAGE_SIZE) {
if (!vector_can_span_multiple_pages && i != 0) {
// Vector is not allowed to span multiple pages, and we already started writing it
continue;
}
// a vector that cannot span multiple pages stays on the page it started on
if (page_info.estimated_page_size >= MAX_UNCOMPRESSED_PAGE_SIZE &&
(vector_can_span_multiple_pages || i == 0)) {
PageInformation new_info;
new_info.offset = page_info.offset + page_info.row_count;
state.page_info.push_back(new_info);
Expand Down
28 changes: 19 additions & 9 deletions src/duckdb/src/execution/physical_plan/plan_aggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,26 @@ static bool CanUsePartitionedAggregate(ClientContext &context, LogicalAggregate
return false;
}
// get the base columns by projecting over the projection_ids/column_ids
if (!table_scan.projection_ids.empty()) {
for (auto &partition_col : partition_columns) {
partition_col = table_scan.projection_ids[partition_col];
}
}
vector<column_t> base_columns;
for (const auto &partition_idx : partition_columns) {
auto col_idx = partition_idx;
col_idx = table_scan.column_ids[col_idx].GetPrimaryIndex();
base_columns.push_back(col_idx);
if (!table_scan.function.projection_pushdown) {
// Non-pushdown scans output every base column in order. Any projection above the scan already maps references
// into that base-column space.
base_columns = partition_columns;
} else {
if (!table_scan.projection_ids.empty()) {
for (auto &partition_col : partition_columns) {
if (partition_col >= table_scan.projection_ids.size()) {
return false;
}
partition_col = table_scan.projection_ids[partition_col];
}
}
for (const auto &partition_idx : partition_columns) {
if (partition_idx >= table_scan.column_ids.size()) {
return false;
}
base_columns.push_back(table_scan.column_ids[partition_idx].GetPrimaryIndex());
}
}
// check if the source operator is partitioned by the grouping columns
TableFunctionPartitionInput input(table_scan.bind_data.get(), base_columns);
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "6-dev178"
#define DUCKDB_PATCH_VERSION "6-dev196"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 5
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.5.6-dev178"
#define DUCKDB_VERSION "v1.5.6-dev196"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "24d663a6dc"
#define DUCKDB_SOURCE_ID "55e4668b8f"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
6 changes: 1 addition & 5 deletions src/duckdb/src/include/duckdb/main/extension_entries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"icu_collate_fo", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_fr", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_fr_ca", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_fy", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_ga", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_gl", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_gu", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand Down Expand Up @@ -310,7 +309,6 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"icu_collate_ku", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_ky", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_lb", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_lij", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_lkt", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_ln", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_lo", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand All @@ -329,7 +327,6 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"icu_collate_nl", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_nn", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_noaccent", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_nso", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_om", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_or", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_pa", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand All @@ -350,14 +347,12 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"icu_collate_sr_ba", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_sr_me", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_sr_rs", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_st", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_sv", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_sw", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_ta", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_te", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_th", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_tk", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_tn", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_to", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_tr", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
{"icu_collate_ug", "icu", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand Down Expand Up @@ -497,6 +492,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"now", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_begin_transaction", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_bind_params", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_cancel_query", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_close", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_commit", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
{"odbc_connect", "odbc_scanner", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand Down
Loading
Loading