8000 V1.2 histrionicus by Mytherin · Pull Request #16070 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

V1.2 histrionicus #16070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 60 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a71e60f
finalize the local append before attempting an update, or the node we…
Tishj Jan 27, 2025
5d37854
conditional append flush
Tishj Jan 28, 2025
92894f6
remove the flush, will happen inside PerformOnConflictAction already
Tishj Jan 28, 2025
c059f90
fix RETURNING clause for UPSERT
Tishj Jan 29, 2025
b9896b6
Attaching with enable external access is allowed again - it is up to …
Mytherin Feb 2, 2025
1d36407
Attaching storage extensions with enable external access is allowed a…
Mytherin Feb 2, 2025
9cab097
Avoid running autoloading tests from remote when not deploying
carlopi Feb 3, 2025
26ef00c
Merge remote-tracking branch 'upstream/main' into upsert_local_update…
Tishj Feb 3, 2025
c60db53
Merge branch 'upsert_local_update_issue' into upsert_returning_fixes
Tishj Feb 3, 2025
ba1ff79
[chore] Python's SQLLogic: skip 3 more tests
carlopi Feb 2, 2025
87b97e8
create the append chunk, that has the right shape that is required by…
Tishj Feb 3, 2025
a992f2d
[chore] Change benchmark, to avoid loading TPCH to be required
carlopi Jan 29, 2025
95bccd4
Revert "Format fmt: with space before name is deprecated"
carlopi Feb 3, 2025
b64e362
prevent incorrect result when there are inner conflicts and the DO UP…
Tishj Feb 3, 2025
efce0dc
SwiftRelease - don't fail if tag already exists, just skip
Mytherin Feb 3, 2025
1b3ceaa
No quotes
Mytherin Feb 3, 2025
c12faa6
[chore] Change benchmark, to avoid loading TPCH to be required (#16034)
Mytherin Feb 3, 2025
8000
1946e41
[chore] Python's SQLLogic: skip 3 more tests (#16033)
Mytherin Feb 3, 2025
342d31d
Check if output is empty instead of checking result
Mytherin Feb 3, 2025
e235e48
SwiftRelease - don't fail if tag already exists, just skip (#16037)
Mytherin Feb 3, 2025
ee4ad60
Fix #16026: remove incorrect assertion that could get triggered in To…
Mytherin Feb 3, 2025
3fc7043
Install errors to point to documentation
carlopi Jan 31, 2025
93a1178
Extension install error messages: avoid 'Are you using a development …
carlopi Feb 1, 2025
f342330
Change to https://duckdb.org/docs/extensions/troubleshooting
carlopi Feb 3, 2025
ceba7b5
Extension troubleshooting erorr message: Add test
carlopi Feb 3, 2025
66a7aae
Replace FormatException with InvalidInputException
Flogex Feb 3, 2025
fb17337
Fix gcc 4.8 compilation (#16038)
Mytherin Feb 3, 2025
9eba7eb
Avoid running autoloading tests from remote when not deploying (#16032)
Mytherin Feb 3, 2025
9214bc2
fix table filter comparison
samansmink Feb 3, 2025
a0346b0
do not aggressively allocate extra space
Tmonster Feb 3, 2025
317a630
[Dev] Prevent incorrect result in UPSERT in certain situations (#16035)
Mytherin Feb 3, 2025
5c9b5be
Fix #16026: remove incorrect assertion that could get triggered in To…
Mytherin Feb 3, 2025
600aee5
Replace `FormatException` with `InvalidInputException` in Parquet rea…
Mytherin Feb 3, 2025
3fbbc64
Install errors to point to documentation (#16020)
Mytherin Feb 3, 2025
ec0906d
Adds a fix that a database wasnt closed until GC
tqml Feb 3, 2025
d5a97a8
Format fix
tqml Feb 3, 2025
4332964
Check if the file was written
tqml Feb 3, 2025
0bee8ed
Fix spawn process
tqml Feb 3, 2025
b29d2ac
set jemalloc narenas to 1 if no other way to get it
yznima Feb 3, 2025
5b14c28
fix table filter comparison (#16042)
Mytherin Feb 4, 2025
1cd8d83
Do not aggressively allocate extra space (#16043)
Mytherin Feb 4, 2025
77c32fe
set jemalloc narenas to 1 if no other way to get it (#16046)
Mytherin Feb 4, 2025
a9bf7ad
[Julia] Fixes a a bug that the database is not properly closed even a…
Mytherin Feb 4, 2025
599abeb
memory safety checks
taniabogatsch Feb 4, 2025
f402189
Fix #16052: only override alias if it is provided by the user
Mytherin Feb 4, 2025
72cb9d2
Support * LIKE .. ESCAPE ..
Mytherin Feb 4, 2025
a34f387
Memory safety checks for index (de)serialization (#16051)
Mytherin Feb 4, 2025
7bafd7b
add static libs for linux arm and amd
taniabogatsch Feb 4, 2025
22158bb
[Dev] Fix issue with UPSERT updating rows in the transaction-local st…
Mytherin Feb 4, 2025
fd5e46b
adjust tests to expected behavior
taniabogatsch Feb 4, 2025
4908b38
Merge branch 'v1.2-histrionicus' into index-fixes
taniabogatsch Feb 4, 2025
a878e3b
Add Linux arm64 and amd64 to bundled static libraries (#16061)
Mytherin Feb 4, 2025
14fece3
Fix #16052: only override alias if it is provided by the user (#16055)
Mytherin Feb 4, 2025
45ee9ac
Support * LIKE .. ESCAPE .. (#16060)
Mytherin Feb 4, 2025
e755934
Merge branch 'v1.2-histrionicus' into upsert_returning_fixes
Mytherin Feb 4, 2025
1ff7e6e
Add test skips for now
Mytherin Feb 4, 2025
e447295
[Test] Adjust index tests to expected behavior (#16062)
Mytherin Feb 4, 2025
3055e71
Use a shared table lock in TableScanInitGlobal
Mytherin Feb 4, 2025
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
2 changes: 1 addition & 1 deletion .github/actions/build_extensions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ runs:

# Run the unittests (excluding the out-of-tree tests) with the extensions that we deployed to S3
- name: Test deployed extensions
if: ${{ inputs.run_tests == 1 }}
if: ${{ inputs.deploy_as != '' && inputs.run_tests == 1 }}
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ inputs.s3_id }}
Expand Down
92 changes: 89 additions & 3 deletions .github/workflows/BundleStaticLibs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python scripts/amalgamation.py
python3 scripts/amalgamation.py
zip -j static-lib-osx-${{ matrix.architecture }}.zip src/include/duckdb.h build/release/libduckdb_bundle.a
./scripts/upload-assets-to-staging.sh github_release static-lib-osx-${{ matrix.architecture }}.zip

Expand Down Expand Up @@ -124,7 +124,6 @@ jobs:

- uses: ./.github/actions/build_extensions
with:
deploy_as: windows_amd64_mingw
duckdb_arch: windows_amd64_mingw
vcpkg_target_triplet: x64-mingw-static
treat_warn_as_error: 0
Expand Down Expand Up @@ -153,4 +152,91 @@ jobs:
with:
name: duckdb-static-lib-windows-mingw
path: |
static-lib-windows-mingw.zip
static-lib-windows-mingw.zip
bundle-linux-arm64-static-libs:
name: Linux arm64 static libs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- name: Build
shell: bash
run: |
docker run \
-v.:/duckdb \
-e CC=aarch64-linux-gnu-gcc \
-e CXX=aarch64-linux-gnu-g++ \
-e CMAKE_BUILD_PARALLEL_LEVEL=2 \
-e OVERRIDE_GIT_DESCRIBE=$OVERRIDE_GIT_DESCRIBE \
-e EXTENSION_CONFIGS='/duckdb/.github/config/bundled_extensions.cmake' \
-e ENABLE_EXTENSION_AUTOLOADING=1 \
-e ENABLE_EXTENSION_AUTOINSTALL=1 \
-e FORCE_WARN_UNUSED=1 \
-e DUCKDB_PLATFORM=linux_arm64 \
ubuntu:18.04 \
bash -c "/duckdb/scripts/setup_ubuntu1804.sh && git config --global --add safe.directory /duckdb && make bundle-library -C /duckdb"
- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python3 scripts/amalgamation.py
zip -j static-lib-linux-arm64.zip src/include/duckdb.h build/release/libduckdb_bundle.a
./scripts/upload-assets-to-staging.sh github_release static-lib-linux-arm64.zip
- uses: actions/upload-artifact@v4
with:
name: duckdb-static-lib-linux-arm64
path: |
static-lib-linux-arm64.zip
bundle-linux-amd64-static-libs:
name: Linux amd64 static libs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- name: Install pytest
run: |
python3 -m pip install pytest
- name: Build
shell: bash
run: |
export PWD=`pwd`
docker run \
-v$PWD:$PWD \
-e CMAKE_BUILD_PARALLEL_LEVEL=2 \
-e OVERRIDE_GIT_DESCRIBE=$OVERRIDE_GIT_DESCRIBE \
-e EXTENSION_CONFIGS="$PWD/.github/config/bundled_extensions.cmake" \
-e ENABLE_EXTENSION_AUTOLOADING=1 \
-e ENABLE_EXTENSION_AUTOINSTALL=1 \
-e BUILD_BENCHMARK=1 \
-e FORCE_WARN_UNUSED=1 \
-e DUCKDB_RUN_PARALLEL_CSV_TESTS=1 \
quay.io/pypa/manylinux2014_x86_64 \
bash -c "yum install -y perl-IPC-Cmd && git config --global --add safe.directory $PWD && make bundle-library -C $PWD"
- name: Print platform
shell: bash
run: ./build/release/duckdb -c "PRAGMA platform;"

- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python3 scripts/amalgamation.py
zip -j static-lib-linux-amd64.zip src/include/duckdb.h build/release/libduckdb_bundle.a
./scripts/upload-assets-to-staging.sh github_release static-lib-linux-amd64.zip
- uses: actions/upload-artifact@v4
with:
name: duckdb-static-lib-linux-amd64
path: |
static-lib-linux-amd64.zip
2 changes: 1 addition & 1 deletion .github/workflows/LinuxRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
shell: bash
if: ${{ inputs.skip_tests != 'true' }}
run: |
build/release/benchmark/benchmark_runner benchmark/tpch/sf1/q01.benchmark
build/release/benchmark/benchmark_runner benchmark/micro/update/update_with_join.benchmark
build/release/duckdb -c "COPY (SELECT 42) TO '/dev/stdout' (FORMAT PARQUET)" | cat

linux-release-aarch64:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/R.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:

- uses: ./.github/actions/build_extensions
with:
deploy_as: windows_amd64_mingw
duckdb_arch: windows_amd64_mingw
vcpkg_target_triplet: x64-mingw-static
treat_warn_as_error: 0
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/SwiftRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,9 @@ jobs:
cd source-repo
export TAG_NAME=`python3 -c "import sys, os; sys.path.append(os.path.join('scripts')); import package_build; print(package_build.git_dev_version())"`
cd ..
git -C updated-repo tag -a $TAG_NAME -m "Release $TAG_NAME"
git -C updated-repo push origin $TAG_NAME
if [[ $(git -C updated-repo tag -l $TAG_NAME) ]]; then
echo 'Tag '$TAG_NAME' already exists - skipping'
else
git -C updated-repo tag -a $TAG_NAME -m "Release $TAG_NAME"
git -C updated-repo push origin $TAG_NAME
fi
1 change: 0 additions & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ jobs:
- uses: ./.github/actions/build_extensions
with:
vcpkg_target_triplet: x64-windows-static-md
deploy_as: windows_amd64
treat_warn_as_error: 0
run_tests: ${{ inputs.skip_tests != 'true' && 1 || 0 }}
run_autoload_tests: ${{ inputs.skip_tests != 'true' && 1 || 0 }}
Expand Down
8 changes: 6 additions & 2 deletions extension/jemalloc/jemalloc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,20 @@ jemalloc_constructor(void) {
if (cpu_count == 0) {
cpu_count = duckdb_malloc_ncpus();
}
unsigned long long narenas = cpu_count / 2;
if (narenas == 0) {
narenas = 1;
}
unsigned long long bgt_count = cpu_count / 16;
if (bgt_count == 0) {
bgt_count = 1;
}
// decay is in ms
unsigned long long decay = DUCKDB_JEMALLOC_DECAY * 1000;
#ifdef DEBUG
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "junk:true,oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, cpu_count / 2, bgt_count);
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "junk:true,oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, narenas, bgt_count);
#else
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, cpu_count / 2, bgt_count);
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, narenas, bgt_count);
#endif
je_malloc_conf = JE_MALLOC_CONF_BUFFER;
malloc_init();
Expand Down
8 changes: 6 additions & 2 deletions extension/jemalloc/jemalloc/src/jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4275,16 +4275,20 @@ jemalloc_constructor(void) {
if (cpu_count == 0) {
cpu_count = duckdb_malloc_ncpus();
}
unsigned long long narenas = cpu_count / 2;
if (narenas == 0) {
narenas = 1;
}
unsigned long long bgt_count = cpu_count / 16;
if (bgt_count == 0) {
bgt_count = 1;
}
// decay is in ms
unsigned long long decay = DUCKDB_JEMALLOC_DECAY * 1000;
#ifdef DEBUG
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "junk:true,oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, cpu_count / 2, bgt_count);
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "junk:true,oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, narenas, bgt_count);
#else
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, cpu_count / 2, bgt_count);
snprintf(JE_MALLOC_CONF_BUFFER, JE_MALLOC_CONF_BUFFER_SIZE, "oversize_threshold:268435456,dirty_decay_ms:%llu,muzzy_decay_ms:%llu,narenas:%llu,max_background_threads:%llu", decay, decay, narenas, bgt_count);
#endif
je_malloc_conf = JE_MALLOC_CONF_BUFFER;
malloc_init();
Expand Down
6 changes: 0 additions & 6 deletions extension/parquet/include/parquet_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@ class ParquetReader {
void PrepareRowGroupBuffer(ParquetReaderScanState &state, idx_t out_col_idx);
LogicalType DeriveLogicalType(const SchemaElement &s_ele);

template <typename... Args>
std::runtime_error FormatException(const string fmt_str, Args... params) {
return std::runtime_error("Failed to read Parquet file \"" + file_name +
"\": " + StringUtil::Format(fmt_str, params...));
}

private:
unique_ptr<FileHandle> file_handle;
};
Expand Down
3 changes: 2 additions & 1 deletion extension/parquet/parquet_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ void ParquetReader::InitializeSchema(ClientContext &context) {
}
// check if we like this schema
if (file_meta_data->schema.size() < 2) {
throw FormatException("Need at least one non-root column in the file");
throw InvalidInputException("Failed to read Parquet file '%s': Need at least one non-root column in the file",
file_name);
}
root_reader = CreateReader(context);
auto &root_type = root_reader->Type();
Expand Down
5 changes: 4 additions & 1 deletion src/common/types/column/column_data_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,10 @@ static bool IsComplexType(const LogicalType &type) {

void ColumnDataCollection::Append(ColumnDataAppendState &state, DataChunk &input) {
D_ASSERT(!finished_append);
D_ASSERT(types == input.GetTypes());
{
auto input_types = input.GetTypes();
D_ASSERT(types == input_types);
}

auto &segment = *segments.back();
for (idx_t vector_idx = 0; vector_idx < types.size(); vector_idx++) {
Expand Down
12 changes: 12 additions & 0 deletions src/execution/index/fixed_size_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ FixedSizeAllocatorInfo FixedSizeAllocator::GetInfo() const {

for (const auto &buffer : buffers) {
info.buffer_ids.push_back(buffer.first);

// Memory safety check.
if (buffer.first > idx_t(MAX_ROW_ID)) {
throw InternalException("Initializing invalid buffer ID in FixedSizeAllocator::GetInfo");
}

info.block_pointers.push_back(buffer.second->block_pointer);
info.segment_counts.push_back(buffer.second->segment_count);
info.allocation_sizes.push_back(buffer.second->allocation_size);
Expand Down Expand Up @@ -289,6 +295,12 @@ void FixedSizeAllocator::Init(const FixedSizeAllocatorInfo &info) {

// read all FixedSizeBuffer data
auto buffer_id = info.buffer_ids[i];

// Memory safety check.
if (buffer_id > idx_t(MAX_ROW_ID)) {
throw InternalException("Initializing invalid buffer ID in FixedSizeAllocator::Init");
}

auto buffer_block_pointer = info.block_pointers[i];
auto segment_count = info.segment_counts[i];
auto allocation_size = info.allocation_sizes[i];
Expand Down
10 changes: 10 additions & 0 deletions src/execution/index/unbound_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ UnboundIndex::UnboundIndex(unique_ptr<CreateInfo> create_info, IndexStorageInfo
TableIOManager &table_io_manager, AttachedDatabase &db)
: Index(create_info->Cast<CreateIndexInfo>().column_ids, table_io_manager, db), create_info(std::move(create_info)),
storage_info(std::move(storage_info_p)) {

// Memory safety check.
for (idx_t info_idx = 0; info_idx < storage_info.allocator_infos.size(); info_idx++) {
auto &info = storage_info.allocator_infos[info_idx];
for (idx_t buffer_idx = 0; buffer_idx < info.buffer_ids.size(); buffer_idx++) {
if (info.buffer_ids[buffer_idx] > idx_t(MAX_ROW_ID)) {
throw InternalException("Found invalid buffer ID in UnboundIndex constructor");
}
}
}
}

void UnboundIndex::CommitDrop() {
Expand Down
Loading
Loading
0