Skip to content

Commit

Permalink
Update vendored DuckDB sources to 76cd3f3
Browse files Browse the repository at this point in the history
  • Loading branch information
duckdblabs-bot committed Oct 9, 2024
1 parent 76cd3f3 commit 4e6d564
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ class TemplatedColumnReader : public ColumnReader {

void Offsets(uint32_t *offsets, uint8_t *defines, uint64_t num_values, parquet_filter_t &filter,
idx_t result_offset, Vector &result) override {
if (!dict || dict->len == 0) {
throw IOException("Parquet file is likely corrupted, cannot have dictionary offsets without seeing a "
"non-empty dictionary first.");
}
if (HasDefines()) {
OffsetsInternal<true>(*dict, offsets, defines, num_values, filter, result_offset, result);
} else {
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 "2-dev104"
#define DUCKDB_PATCH_VERSION "2-dev108"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 1
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.1.2-dev104"
#define DUCKDB_VERSION "v1.1.2-dev108"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "5a9a382a57"
#define DUCKDB_SOURCE_ID "8cec9b1537"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class OrderBinder {

unique_ptr<Expression> CreateExtraReference(unique_ptr<ParsedExpression> expr);

//! Sets the query component, for error messages
void SetQueryComponent(string component = string());

private:
unique_ptr<Expression> CreateProjectionReference(ParsedExpression &expr, const idx_t index);
unique_ptr<Expression> BindConstant(ParsedExpression &expr);
Expand All @@ -46,6 +49,7 @@ class OrderBinder {
vector<reference<Binder>> binders;
optional_ptr<vector<unique_ptr<ParsedExpression>>> extra_list;
SelectBindState &bind_state;
string query_component = "ORDER BY";
};

} // namespace duckdb
4 changes: 4 additions & 0 deletions src/duckdb/src/planner/binder/query_node/bind_select_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,21 @@ void Binder::PrepareModifiers(OrderBinder &order_binder, QueryNode &statement, B
make_uniq<ConstantExpression>(Value::INTEGER(UnsafeNumericCast<int32_t>(1 + i))));
}
}
order_binder.SetQueryComponent("DISTINCT ON");
for (auto &distinct_on_target : distinct.distinct_on_targets) {
auto expr = BindOrderExpression(order_binder, std::move(distinct_on_target));
if (!expr) {
continue;
}
bound_distinct->target_distincts.push_back(std::move(expr));
}
order_binder.SetQueryComponent();

bound_modifier = std::move(bound_distinct);
break;
}
case ResultModifierType::ORDER_MODIFIER: {

auto &order = mod->Cast<OrderModifier>();
auto bound_order = make_uniq<BoundOrderModifier>();
auto &config = DBConfig::GetConfig(context);
Expand Down
16 changes: 13 additions & 3 deletions src/duckdb/src/planner/expression_binder/order_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ optional_idx OrderBinder::TryGetProjectionReference(ParsedExpression &expr) cons
// this is disabled by default (matching Postgres) - but we can control this with a setting
auto &config = ClientConfig::GetConfig(binders[0].get().context);
if (!config.order_by_non_integer_literal) {
throw BinderException(expr, "ORDER BY non-integer literal has no effect.\n* SET "
"order_by_non_integer_literal=true to allow this behavior.");
throw BinderException(expr,
"%s non-integer literal has no effect.\n* SET "
"order_by_non_integer_literal=true to allow this behavior.",
query_component);
}
break;
}
Expand Down Expand Up @@ -94,6 +96,14 @@ optional_idx OrderBinder::TryGetProjectionReference(ParsedExpression &expr) cons
return optional_idx();
}

void OrderBinder::SetQueryComponent(string component) {
if (component.empty()) {
query_component = "ORDER BY";
} else {
query_component = std::move(component);
}
}

unique_ptr<Expression> OrderBinder::BindConstant(ParsedExpression &expr) {
auto index = TryGetProjectionReference(expr);
if (!index.IsValid()) {
Expand Down Expand Up @@ -130,7 +140,7 @@ unique_ptr<Expression> OrderBinder::Bind(unique_ptr<ParsedExpression> expr) {
break;
}
case ExpressionClass::PARAMETER: {
throw ParameterNotAllowedException("Parameter not supported in ORDER BY clause");
throw ParameterNotAllowedException("Parameter not supported in %s clause", query_component);
}
case ExpressionClass::COLLATE: {
auto &collation = expr->Cast<CollateExpression>();
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,15 @@

#include "extension/icu/third_party/icu/i18n/double-conversion-strtod.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-bignum-dtoa.cpp"
#include "extension/icu/third_party/icu/i18n/double-conversion-fast-dtoa.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-bignum.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-cached-powers.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-bignum-dtoa.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-double-to-string.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-string-to-double.cpp"

#include "extension/icu/third_party/icu/i18n/double-conversion-fast-dtoa.cpp"

0 comments on commit 4e6d564

Please sign in to comment.