Skip to content

Commit 8ee333f

Browse files
duckdblabs-botgithub-actions[bot]
authored andcommitted
Update vendored DuckDB sources to 041f4cac68
1 parent d85729c commit 8ee333f

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

src/duckdb/extension/parquet/parquet_writer.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "duckdb.hpp"
44
#include "mbedtls_wrapper.hpp"
55
#include "parquet_crypto.hpp"
6+
#include "parquet_decimal_utils.hpp"
67
#include "parquet_shredding.hpp"
78
#include "parquet_timestamp.hpp"
89
#include "resizable_buffer.hpp"
@@ -751,8 +752,17 @@ struct DecimalStatsUnifier : public NumericStatsUnifier<T> {
751752
if (stats.empty()) {
752753
return string();
753754
}
754-
auto numeric_val = Load<T>(const_data_ptr_cast(stats.data()));
755-
return Value::DECIMAL(numeric_val, width, scale).ToString();
755+
756+
auto stats_data = const_data_ptr_cast(stats.data());
757+
758+
if (sizeof(T) == sizeof(hugeint_t)) {
759+
auto _schema = ParquetColumnSchema();
760+
auto numeric_val = ParquetDecimalUtils::ReadDecimalValue<hugeint_t>(stats_data, stats.size(), _schema);
761+
return Value::DECIMAL(numeric_val, width, scale).ToString();
762+
} else {
763+
auto numeric_val = Load<T>(stats_data);
764+
return Value::DECIMAL(numeric_val, width, scale).ToString();
765+
}
756766
}
757767
};
758768

@@ -874,7 +884,7 @@ struct NullStatsUnifier : public ColumnStatsUnifier {
874884
static unique_ptr<ColumnStatsUnifier> GetBaseStatsUnifier(const LogicalType &type) {
875885
switch (type.id()) {
876886
case LogicalTypeId::BOOLEAN:
877-
return make_uniq<NullStatsUnifier>();
887+
return make_uniq<NumericStatsUnifier<int8_t>>();
878888
case LogicalTypeId::TINYINT:
879889
case LogicalTypeId::SMALLINT:
880890
case LogicalTypeId::INTEGER:
@@ -919,6 +929,8 @@ static unique_ptr<ColumnStatsUnifier> GetBaseStatsUnifier(const LogicalType &typ
919929
return make_uniq<DecimalStatsUnifier<int32_t>>(width, scale);
920930
case PhysicalType::INT64:
921931
return make_uniq<DecimalStatsUnifier<int64_t>>(width, scale);
932+
case PhysicalType::INT128:
933+
return make_uniq<DecimalStatsUnifier<hugeint_t>>(width, scale);
922934
default:
923935
return make_uniq<NullStatsUnifier>();
924936
}

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 "0-dev5019"
2+
#define DUCKDB_PATCH_VERSION "0-dev5021"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 5
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v1.5.0-dev5019"
11+
#define DUCKDB_VERSION "v1.5.0-dev5021"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "43a67ee2be"
14+
#define DUCKDB_SOURCE_ID "041f4cac68"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"

0 commit comments

Comments
 (0)