diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index fb276b9..216d87d 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -16,23 +16,25 @@ jobs: matrix: # Add commits/tags to build against other DuckDB versions duckdb_version: [ '' ] - arch: ['linux_amd64_gcc4'] + arch: ['linux_amd64'] vcpkg_version: [ '2023.04.15' ] include: - - arch: 'linux_amd64_gcc4' - container: 'quay.io/pypa/manylinux2014_x86_64' + - arch: 'linux_amd64' + container: 'quay.io/pypa/manylinux_2_28_x86_64' vcpkg_triplet: 'x64-linux' env: VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }} GEN: Ninja VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - name: Install required ubuntu packages if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} run: | + export PATH=$PATH:/usr/bin/ + apt update + apt install apt apt-get update -y -qq apt-get install -y -qq software-properties-common add-apt-repository ppa:git-core/ppa @@ -117,4 +119,4 @@ jobs: with: name: ${{matrix.arch}}-extensions path: | - build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension \ No newline at end of file + build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index af07de7..dfc1ad9 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -17,6 +17,7 @@ jobs: uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main with: duckdb_version: main + ci_tools_version: main extension_name: postgres_scanner exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' @@ -27,6 +28,7 @@ jobs: secrets: inherit with: duckdb_version: main + ci_tools_version: main extension_name: postgres_scanner exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} diff --git a/.gitmodules b/.gitmodules index 7114de7..28232e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "duckdb"] path = duckdb url = https://github.com/duckdb/duckdb.git +[submodule "extension-ci-tools"] + path = extension-ci-tools + url = https://github.com/duckdb/extension-ci-tools diff --git a/duckdb b/duckdb index fa5c2fe..7e3dca3 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit fa5c2fe15f3da5f32397b009196c0895fce60820 +Subproject commit 7e3dca3b06ab9cc99cf205fa1ae8003841631f81 diff --git a/extension-ci-tools b/extension-ci-tools new file mode 160000 index 0000000..46a8dd6 --- /dev/null +++ b/extension-ci-tools @@ -0,0 +1 @@ +Subproject commit 46a8dd6850b218b2c1a0ede5daf5053bdc225102 diff --git a/src/postgres_scanner.cpp b/src/postgres_scanner.cpp index dfee871..b526a51 100644 --- a/src/postgres_scanner.cpp +++ b/src/postgres_scanner.cpp @@ -484,17 +484,21 @@ static void PostgresScan(ClientContext &context, TableFunctionInput &data, DataC local_state.ScanChunk(context, bind_data, gstate, output); } -static idx_t PostgresScanBatchIndex(ClientContext &context, const FunctionData *bind_data_p, - LocalTableFunctionState *local_state_p, GlobalTableFunctionState *global_state) { - auto &bind_data = bind_data_p->Cast(); - auto &local_state = local_state_p->Cast(); - return local_state.batch_idx; +static OperatorPartitionData PostgresGetPartitionData(ClientContext &context, TableFunctionGetPartitionInput &input) { + if (input.partition_info.RequiresPartitionColumns()) { + throw InternalException("PostgresScan::GetPartitionData: partition columns not supported"); + } + auto &bind_data = input.bind_data->Cast(); + auto &local_state = input.local_state->Cast(); + return OperatorPartitionData(local_state.batch_idx); } -static string PostgresScanToString(const FunctionData *bind_data_p) { - D_ASSERT(bind_data_p); - auto &bind_data = bind_data_p->Cast(); - return bind_data.table_name; +static InsertionOrderPreservingMap PostgresScanToString(TableFunctionToStringInput &input) { + D_ASSERT(input.bind_data); + InsertionOrderPreservingMap result; + auto &bind_data = input.bind_data->Cast(); + result["Table"] = bind_data.table_name; + return result; } unique_ptr PostgresScanCardinality(ClientContext &context, const FunctionData *bind_data_p) { @@ -538,7 +542,7 @@ PostgresScanFunction::PostgresScanFunction() to_string = PostgresScanToString; serialize = PostgresScanSerialize; deserialize = PostgresScanDeserialize; - get_batch_index = PostgresScanBatchIndex; + get_partition_data = PostgresGetPartitionData; cardinality = PostgresScanCardinality; table_scan_progress = PostgresScanProgress; projection_pushdown = true; @@ -551,7 +555,7 @@ PostgresScanFunctionFilterPushdown::PostgresScanFunctionFilterPushdown() to_string = PostgresScanToString; serialize = PostgresScanSerialize; deserialize = PostgresScanDeserialize; - get_batch_index = PostgresScanBatchIndex; + get_partition_data = PostgresGetPartitionData; cardinality = PostgresScanCardinality; table_scan_progress = PostgresScanProgress; projection_pushdown = true;