Skip to content

Commit

Permalink
Update vendored DuckDB sources to 0ff8d6a
Browse files Browse the repository at this point in the history
  • Loading branch information
duckdblabs-bot committed Oct 8, 2024
1 parent 0ff8d6a commit 76cd3f3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
3 changes: 3 additions & 0 deletions src/duckdb/src/common/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ PermissionException::PermissionException(const string &msg) : Exception(Exceptio
SyntaxException::SyntaxException(const string &msg) : Exception(ExceptionType::SYNTAX, msg) {
}

ExecutorException::ExecutorException(const string &msg) : Exception(ExceptionType::EXECUTOR, msg) {
}

ConstraintException::ConstraintException(const string &msg) : Exception(ExceptionType::CONSTRAINT, msg) {
}

Expand Down
15 changes: 9 additions & 6 deletions src/duckdb/src/common/types/bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,13 @@ void Bit::BitString(const string_t &input, const idx_t &bit_length, string_t &re

auto padding = ComputePadding(bit_length);
res_buf[0] = padding;
auto padding_len = UnsafeNumericCast<idx_t>(padding);
for (idx_t i = 0; i < bit_length; i++) {
if (i < bit_length - input.GetSize()) {
Bit::SetBit(result, i, 0);
Bit::SetBitInternal(result, i + padding_len, 0);
} else {
idx_t bit = buf[i - (bit_length - input.GetSize())] == '1' ? 1 : 0;
Bit::SetBit(result, i, bit);
Bit::SetBitInternal(result, i + padding_len, bit);
}
}
Bit::Finalize(result);
Expand Down Expand Up @@ -310,12 +311,13 @@ void Bit::RightShift(const string_t &bit_string, const idx_t &shift, string_t &r
const uint8_t *buf = reinterpret_cast<const uint8_t *>(bit_string.GetData());

res_buf[0] = buf[0];
auto padding = GetBitPadding(result);
for (idx_t i = 0; i < Bit::BitLength(result); i++) {
if (i < shift) {
Bit::SetBit(result, i, 0);
Bit::SetBitInternal(result, i + padding, 0);
} else {
idx_t bit = Bit::GetBit(bit_string, i - shift);
Bit::SetBit(result, i, bit);
Bit::SetBitInternal(result, i + padding, bit);
}
}
Bit::Finalize(result);
Expand All @@ -326,12 +328,13 @@ void Bit::LeftShift(const string_t &bit_string, const idx_t &shift, string_t &re
const uint8_t *buf = reinterpret_cast<const uint8_t *>(bit_string.GetData());

res_buf[0] = buf[0];
auto padding = GetBitPadding(result);
for (idx_t i = 0; i < Bit::BitLength(bit_string); i++) {
if (i < (Bit::BitLength(bit_string) - shift)) {
idx_t bit = Bit::GetBit(bit_string, shift + i);
Bit::SetBit(result, i, bit);
Bit::SetBitInternal(result, i + padding, bit);
} else {
Bit::SetBit(result, i, 0);
Bit::SetBitInternal(result, i + padding, 0);
}
}
Bit::Finalize(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1470,10 +1470,6 @@ void StringValueScanner::SetStart() {
}
return;
}
if (state_machine->options.IgnoreErrors()) {
// If we are ignoring errors we don't really need to figure out a line.
return;
}
// The result size of the data after skipping the row is one line
// We have to look for a new line that fits our schema
// 1. We walk until the next new line
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-dev90"
#define DUCKDB_PATCH_VERSION "2-dev104"
#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-dev90"
#define DUCKDB_VERSION "v1.1.2-dev104"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "1eac05ecd3"
#define DUCKDB_SOURCE_ID "5a9a382a57"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
10 changes: 10 additions & 0 deletions src/duckdb/src/include/duckdb/common/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@ class InvalidInputException : public Exception {
}
};

class ExecutorException : public Exception {
public:
DUCKDB_API explicit ExecutorException(const string &msg);

template <typename... ARGS>
explicit ExecutorException(const string &msg, ARGS... params)
: ExecutorException(ConstructMessage(msg, params...)) {
}
};

class InvalidConfigurationException : public Exception {
public:
DUCKDB_API explicit InvalidConfigurationException(const string &msg);
Expand Down
7 changes: 0 additions & 7 deletions src/duckdb/src/optimizer/deliminator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ unique_ptr<LogicalOperator> Deliminator::Optimize(unique_ptr<LogicalOperator> op
if (candidate.joins.size() == candidate.delim_get_count && all_removed) {
delim_join.type = LogicalOperatorType::LOGICAL_COMPARISON_JOIN;
delim_join.duplicate_eliminated_columns.clear();
if (all_equality_conditions) {
for (auto &cond : delim_join.conditions) {
if (IsEqualityJoinCondition(cond)) {
cond.comparison = ExpressionType::COMPARE_NOT_DISTINCT_FROM;
}
}
}
}

// Only DelimJoins are ever created as SINGLE joins,
Expand Down

0 comments on commit 76cd3f3

Please sign in to comment.