Skip to content

Commit b992342

Browse files
lmanganiVotre Nom
andauthored
Fixes duckdb v1.3.0 (local) (#27)
* Fix duckdb v1.3.0 (#26) --------- Co-authored-by: Votre Nom <[email protected]> Co-authored-by: lmangani <[email protected]>
1 parent 9b19082 commit b992342

File tree

7 files changed

+26
-74
lines changed

7 files changed

+26
-74
lines changed

.github/workflows/MainDistributionPipeline.yml

Lines changed: 7 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,26 @@
44
name: Main Extension Distribution Pipeline
55
on:
66
push:
7-
paths-ignore:
8-
- "*/**.md"
9-
- "*/**.yml"
107
pull_request:
118
workflow_dispatch:
12-
release:
13-
types: [published]
149

1510
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' && github.sha || '' }}
1712
cancel-in-progress: true
1813

1914
jobs:
20-
# Temporarily disabled because main is broken
2115
# duckdb-next-build:
22-
# name: Build extension binaries (next)
16+
# name: Build extension binaries
2317
# uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
2418
# with:
25-
# duckdb_version: 1.1.2
26-
# ci_tools_version: 1.1.2
19+
# duckdb_version: main
20+
# ci_tools_version: main
2721
# extension_name: chsql
28-
# We have to build v1.2.0 based due to go-duckdb restrictions
29-
duckdb-1-2-0-build:
30-
name: Build extension binaries
31-
uses: duckdb/extension-ci-tools/.github/workflows/[email protected]
32-
with:
33-
duckdb_version: v1.2.0
34-
ci_tools_version: v1.2.0
35-
extension_name: chsql
3622

3723
duckdb-stable-build:
3824
name: Build extension binaries
39-
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.2.1
25+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
4026
with:
41-
duckdb_version: v1.2.1
42-
ci_tools_version: v1.2.1
27+
duckdb_version: v1.3.0
28+
ci_tools_version: v1.3.0
4329
extension_name: chsql
44-
45-
release-all-artifacts:
46-
name: Process Extension Artifacts
47-
needs: [duckdb-1-2-0-build, duckdb-stable-build]
48-
if: github.event_name == 'release' && github.event.action == 'published'
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v4
52-
53-
- name: Download all artifacts
54-
uses: actions/download-artifact@v4
55-
with:
56-
path: downloaded-artifacts
57-
58-
- name: List downloaded artifacts
59-
run: |
60-
mkdir to-upload; \
61-
echo "Artifacts downloaded:" \
62-
ls -la downloaded-artifacts; \
63-
for l in `ls downloaded-artifacts`; do \
64-
VER=`echo $l | cut -d '-' -f 2`; \
65-
ARCH=`echo $l| cut -d '-' -f 4`; \
66-
EXT=`ls downloaded-artifacts/$l | cut -b 7-`; \
67-
mv downloaded-artifacts/$l/chsql.$EXT to-upload/chsql.$VER.$ARCH.$EXT; \
68-
done; \
69-
echo "Artifacts to be uploaded:" \
70-
ls -la to-upload
71-
72-
- name: Upload Release Assets
73-
uses: softprops/action-gh-release@v1
74-
with:
75-
files: to-upload/*

chsql/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ include_directories(
1919
../duckdb/third_party/thrift
2020
../duckdb/third_party/snappy
2121
../duckdb/third_party/zstd/include
22-
../duckdb/third_party/mbedtls
2322
../duckdb/third_party/mbedtls/include
2423
../duckdb/third_party/brotli/include)
2524
set(EXTENSION_SOURCES src/chsql_extension.cpp src/duck_flock.cpp src/chsql_system.cpp src/parquet_types.cpp)
2625
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
2726
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
2827
# Link OpenSSL in both the static library as the loadable extension
29-
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
30-
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
28+
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto duckdb_mbedtls)
29+
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto duckdb_mbedtls)
3130
install(
3231
TARGETS ${EXTENSION_NAME}
3332
EXPORT "${DUCKDB_EXPORT_SET}"

chsql/extension_config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_directories(
88
../duckdb/third_party/thrift
99
../duckdb/third_party/snappy
1010
../duckdb/third_party/zstd/include
11-
../duckdb/third_party/mbedtls
11+
# ../duckdb/third_party/mbedtls
1212
../duckdb/third_party/mbedtls/include
1313
../duckdb/third_party/brotli/include)
1414

chsql/src/duck_flock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace duckdb {
104104

105105
try {
106106
if (res->TryFetch(data_chunk, error_data)) {
107-
if (data_chunk && !data_chunk->size() == 0) {
107+
if (data_chunk && data_chunk->size() != 0) {
108108
output.Append(*data_chunk);
109109
return;
110110
}

chsql/src/parquet_ordered_scan.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "duckdb/common/exception.hpp"
33
#include <parquet_reader.hpp>
44
#include "chsql_extension.hpp"
5-
#include <duckdb/common/multi_file_list.hpp>
5+
#include <duckdb/common/multi_file/multi_file_list.hpp>
66
#include "chsql_parquet_types.h"
77

88
namespace duckdb {
@@ -35,11 +35,10 @@ namespace duckdb {
3535
haveAbsentColumns = true;
3636
continue;
3737
}
38-
columnMap.push_back(schema_column - reader->metadata->metadata->schema.begin() - 1);
39-
reader->reader_data.column_ids.push_back(
40-
schema_column - reader->metadata->metadata->schema.begin() - 1);
41-
reader->reader_data.column_mapping.push_back(
42-
it - returnCols.begin());
38+
columnMap.push_back(static_cast<column_t>(schema_column - reader->metadata->metadata->schema.begin() - 1));
39+
reader->column_ids.push_back(
40+
MultiFileLocalColumnId(static_cast<column_t>(schema_column - reader->metadata->metadata->schema.begin() - 1)));
41+
reader->column_indexes.emplace_back(static_cast<idx_t>(it - returnCols.begin()));
4342
}
4443
auto order_by_column_it = find_if(
4544
reader->metadata->metadata->schema.begin(),
@@ -55,7 +54,7 @@ namespace duckdb {
5554
}
5655
void Scan(ClientContext& ctx) {
5756
chunk->Reset();
58-
reader->Scan(*scanState, *chunk);
57+
reader->Scan(ctx, *scanState, *chunk);
5958
if (!haveAbsentColumns || chunk->size() == 0) {
6059
return;
6160
}
@@ -180,7 +179,7 @@ namespace duckdb {
180179
ParquetOptions po;
181180
po.binary_as_string = true;
182181
set->reader = make_uniq<ParquetReader>(context, file, po, nullptr);
183-
res.push_back(move(set));
182+
res.push_back(std::move(set));
184183
}
185184
}
186185

@@ -189,16 +188,16 @@ namespace duckdb {
189188
Connection conn(*context.db);
190189
auto res = make_uniq<OrderedReadFunctionData>();
191190
auto files = ListValue::GetChildren(input.inputs[0]);
192-
vector<string> fileNames;
191+
vector<OpenFileInfo> fileInfoList;
193192
for (auto & file : files) {
194-
fileNames.push_back(file.ToString());
193+
fileInfoList.emplace_back(file.ToString());
195194
}
196-
GlobMultiFileList fileList(context, fileNames, FileGlobOptions::ALLOW_EMPTY);
197-
string filename;
195+
GlobMultiFileList fileList(context, fileInfoList, FileGlobOptions::ALLOW_EMPTY);
196+
OpenFileInfo file_info;
198197
MultiFileListScanData it;
199198
fileList.InitializeScan(it);
200-
while (fileList.Scan(it, filename)) {
201-
res->files.push_back(filename);
199+
while (fileList.Scan(it, file_info)) {
200+
res->files.push_back(file_info.path);
202201
}
203202
if (res->files.empty()) {
204203
throw InvalidInputException("No files matched the provided pattern.");

duckdb

Submodule duckdb updated 1948 files

0 commit comments

Comments
 (0)