Skip to content

Commit 1eb7d45

Browse files
vendor: Update vendored sources to duckdb/duckdb@c08cb6c (#1805)
Fix duckdb/duckdb#20014: correctly use numeric_limits<T>::min for NumericLimits::Min so that stats are initialized to -infinity for floating points (duckdb/duckdb#20039) bump iceberg (duckdb/duckdb#20032) Issue duckdb/duckdb#20015: Streaming Window Sequence (duckdb/duckdb#20027) Co-authored-by: krlmlr <[email protected]>
1 parent 01a4ad5 commit 1eb7d45

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

R/version.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generated by rconfigure.py, do not edit by hand
22
# DuckDB version information
33

4-
duckdb_version <- "1.4.3-dev201"
4+
duckdb_version <- "1.4.3-dev209"
55

66
# Function to get DuckDB version without establishing a connection
77
get_duckdb_version <- function() {

src/duckdb/extension/parquet/column_writer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,10 @@ ColumnWriter::CreateWriterRecursive(ClientContext &context, ParquetWriter &write
534534
template <>
535535
struct NumericLimits<float_na_equal> {
536536
static constexpr float Minimum() {
537-
return std::numeric_limits<float>::lowest();
537+
return NumericLimits<float>::Minimum();
538538
};
539539
static constexpr float Maximum() {
540-
return std::numeric_limits<float>::max();
540+
return NumericLimits<float>::Maximum();
541541
};
542542
static constexpr bool IsSigned() {
543543
return std::is_signed<float>::value;
@@ -550,10 +550,10 @@ struct NumericLimits<float_na_equal> {
550550
template <>
551551
struct NumericLimits<double_na_equal> {
552552
static constexpr double Minimum() {
553-
return std::numeric_limits<double>::lowest();
553+
return NumericLimits<double>::Minimum();
554554
};
555555
static constexpr double Maximum() {
556-
return std::numeric_limits<double>::max();
556+
return NumericLimits<double>::Maximum();
557557
};
558558
static constexpr bool IsSigned() {
559559
return std::is_signed<double>::value;

src/duckdb/src/execution/physical_plan/plan_window.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
#include "duckdb/execution/operator/aggregate/physical_window.hpp"
33
#include "duckdb/execution/operator/projection/physical_projection.hpp"
44
#include "duckdb/execution/physical_plan_generator.hpp"
5-
#include "duckdb/main/client_context.hpp"
5+
#include "duckdb/main/client_config.hpp"
66
#include "duckdb/planner/expression/bound_reference_expression.hpp"
77
#include "duckdb/planner/expression/bound_window_expression.hpp"
88
#include "duckdb/planner/operator/logical_window.hpp"
99

10-
#include <numeric>
11-
1210
namespace duckdb {
1311

1412
PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalWindow &op) {
@@ -44,12 +42,12 @@ PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalWindow &op) {
4442
// Process the window functions by sharing the partition/order definitions
4543
unordered_map<idx_t, idx_t> projection_map;
4644
vector<vector<idx_t>> window_expressions;
47-
idx_t blocking_count = 0;
45+
idx_t streaming_count = 0;
4846
auto output_pos = input_width;
4947
while (!blocking_windows.empty() || !streaming_windows.empty()) {
50-
const bool process_streaming = blocking_windows.empty();
51-
auto &remaining = process_streaming ? streaming_windows : blocking_windows;
52-
blocking_count += process_streaming ? 0 : 1;
48+
const bool process_blocking = streaming_windows.empty();
49+
auto &remaining = process_blocking ? blocking_windows : streaming_windows;
50+
streaming_count += process_blocking ? 0 : 1;
5351

5452
// Find all functions that share the partitioning of the first remaining expression
5553
auto over_idx = remaining[0];
@@ -122,7 +120,7 @@ PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalWindow &op) {
122120
}
123121

124122
// Chain the new window operator on top of the plan
125-
if (i < blocking_count) {
123+
if (i >= streaming_count) {
126124
auto &window = Make<PhysicalWindow>(types, std::move(select_list), op.estimated_cardinality);
127125
window.children.push_back(plan);
128126
plan = window;

src/duckdb/src/function/table/system/test_all_types.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ vector<TestType> TestAllTypesFun::GetTestTypes(const bool use_large_enum, const
6969
result.emplace_back(LogicalType::TIMESTAMP_TZ, "timestamp_tz");
7070

7171
// More complex numeric types.
72-
result.emplace_back(LogicalType::FLOAT, "float");
73-
result.emplace_back(LogicalType::DOUBLE, "double");
72+
result.emplace_back(LogicalType::FLOAT, "float", Value::FLOAT(std::numeric_limits<float>::lowest()),
73+
Value::FLOAT(std::numeric_limits<float>::max()));
74+
result.emplace_back(LogicalType::DOUBLE, "double", Value::DOUBLE(std::numeric_limits<double>::lowest()),
75+
Value::DOUBLE(std::numeric_limits<double>::max()));
7476
result.emplace_back(LogicalType::DECIMAL(4, 1), "dec_4_1");
7577
result.emplace_back(LogicalType::DECIMAL(9, 4), "dec_9_4");
7678
result.emplace_back(LogicalType::DECIMAL(18, 6), "dec_18_6");

src/duckdb/src/function/table/version/pragma_version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DUCKDB_PATCH_VERSION
2-
#define DUCKDB_PATCH_VERSION "3-dev201"
2+
#define DUCKDB_PATCH_VERSION "3-dev209"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 4
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v1.4.3-dev201"
11+
#define DUCKDB_VERSION "v1.4.3-dev209"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "a86af889de"
14+
#define DUCKDB_SOURCE_ID "c08cb6c83d"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"

src/duckdb/src/include/duckdb/common/limits.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ namespace duckdb {
2424
template <class T>
2525
struct NumericLimits {
2626
static constexpr T Minimum() {
27-
return std::numeric_limits<T>::lowest();
27+
return std::numeric_limits<T>::has_infinity ? -std::numeric_limits<T>::infinity()
28+
: std::numeric_limits<T>::lowest();
2829
}
2930
static constexpr T Maximum() {
30-
return std::numeric_limits<T>::max();
31+
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity()
32+
: std::numeric_limits<T>::max();
3133
}
3234
static constexpr bool IsSigned() {
3335
return std::is_signed<T>::value;

0 commit comments

Comments
 (0)