Merge pull request #257452 from purcell/duckdb-0.9

duckdb: 0.8.1 -> 0.9.0
This commit is contained in:
7c6f434c 2023-10-03 07:44:35 +00:00 committed by GitHub
commit 335a5494b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 145 additions and 32 deletions

View File

@ -15,13 +15,13 @@ let
in
stdenv.mkDerivation rec {
pname = "duckdb";
version = "0.8.1";
version = "0.9.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-LEv9yURkYvONObTbIA4CS+umwCRMH8gRQaDtzbCzID4=";
hash = "sha256-EKvDH7RwOC4Gu/lturrfnGpzXnJ9azIwAFeuVoa6L/Y=";
};
patches = [ ./version.patch ];
@ -36,19 +36,7 @@ stdenv.mkDerivation rec {
++ lib.optionals withOdbc [ unixODBC ];
cmakeFlags = [
"-DBUILD_AUTOCOMPLETE_EXTENSION=ON"
"-DBUILD_ICU_EXTENSION=ON"
"-DBUILD_PARQUET_EXTENSION=ON"
"-DBUILD_TPCH_EXTENSION=ON"
"-DBUILD_TPCDS_EXTENSION=ON"
"-DBUILD_FTS_EXTENSION=ON"
"-DBUILD_HTTPFS_EXTENSION=ON"
"-DBUILD_VISUALIZER_EXTENSION=ON"
"-DBUILD_JSON_EXTENSION=ON"
"-DBUILD_JEMALLOC_EXTENSION=ON"
"-DBUILD_EXCEL_EXTENSION=ON"
"-DBUILD_INET_EXTENSION=ON"
"-DBUILD_TPCE=ON"
"-DDUCKDB_EXTENSION_CONFIGS=${src}/.github/config/in_tree_extensions.cmake"
"-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}"
"-DJDBC_DRIVER=${enableFeature withJdbc}"
] ++ lib.optionals doInstallCheck [
@ -69,6 +57,7 @@ stdenv.mkDerivation rec {
excludes = map (pattern: "exclude:'${pattern}'") [
"[s3]"
"Test closing database during long running query"
"Test using a remote optimizer pass in case thats important to someone"
"test/common/test_cast_hugeint.test"
"test/sql/copy/csv/test_csv_remote.test"
"test/sql/copy/parquet/test_parquet_remote.test"
@ -79,6 +68,8 @@ stdenv.mkDerivation rec {
"test/sql/storage/compression/patas/patas_read.test"
"test/sql/json/read_json_objects.test"
"test/sql/json/read_json.test"
"test/sql/json/table/read_json_objects.test"
"test/sql/json/table/read_json.test"
"test/sql/copy/parquet/parquet_5968.test"
"test/fuzzer/pedro/buffer_manager_out_of_memory.test"
"test/sql/storage/compression/bitpacking/bitpacking_size_calculation.test"
@ -90,6 +81,7 @@ stdenv.mkDerivation rec {
"test/sql/copy/parquet/delta_byte_array_multiple_pages.test"
"test/sql/copy/csv/test_csv_httpfs_prepared.test"
"test/sql/copy/csv/test_csv_httpfs.test"
"test/sql/settings/test_disabled_file_system_httpfs.test"
"test/sql/copy/csv/parallel/test_parallel_csv.test"
"test/sql/copy/csv/parallel/csv_parallel_httpfs.test"
"test/common/test_cast_struct.test"

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 349af6acf7..7ffec0b4cb 100644
index 2b49e11288..0a4a69b9a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,52 +196,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
@@ -244,52 +244,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
set(SUN TRUE)
endif()
@ -56,3 +56,25 @@ index 349af6acf7..7ffec0b4cb 100644
message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")
diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
index fdf2911019..c363cc518a 100644
--- a/tools/pythonpkg/setup.py
+++ b/tools/pythonpkg/setup.py
@@ -163,8 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
for ext in extensions:
toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
-toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
-
class get_pybind_include(object):
def __init__(self, user=False):
@@ -343,7 +341,7 @@ setup(
packages=packages,
include_package_data=True,
python_requires='>=3.7.0',
- setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
+ setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
use_scm_version=setuptools_scm_conf,
tests_require=['google-cloud-storage', 'mypy', 'pytest'],
classifiers=[

View File

@ -1,4 +1,4 @@
{ build-asdf-system, spec, quicklispPackagesFor, pkgs, ... }:
{ build-asdf-system, spec, quicklispPackagesFor, stdenv, pkgs, ... }:
let
@ -80,6 +80,7 @@ let
url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz";
sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2";
};
patches = optionals stdenv.isDarwin [ ./patches/cffi-libffi-darwin-ffi-h.patch ];
};
cl-unicode = build-with-compile-into-pwd {
@ -668,29 +669,64 @@ let
];
};
trivial-clock = build-asdf-system {
pname = "trivial-clock";
version = "trunk";
src = pkgs.fetchFromGitHub {
owner = "ak-coram";
repo = "cl-trivial-clock";
rev = "641e12ab1763914996beb1ceee67aabc9f1a3b1e";
hash = "sha256-mltQEJ2asxyQ/aS/9BuWmN3XZ9bGmmkopcF5YJU1cPk=";
};
systems = [ "trivial-clock" "trivial-clock/test" ];
lispLibs = [ self.cffi self.fiveam ];
};
frugal-uuid = build-asdf-system {
pname = "frugal-uuid";
version = "trunk";
src = pkgs.fetchFromGitHub {
owner = "ak-coram";
repo = "cl-frugal-uuid";
rev = "be27972333a16fc3f16bc7fbf9e3013b2123d75c";
hash = "sha256-rWO43vWMibF8/OxL70jle5nhd9oRWC7+MI44KWrQD48=";
};
systems = [ "frugal-uuid"
"frugal-uuid/non-frugal"
"frugal-uuid/benchmark"
"frugal-uuid/test" ];
lispLibs = with self; [
babel
bordeaux-threads
fiveam
ironclad
trivial-benchmark
trivial-clock
];
};
duckdb = build-asdf-system {
pname = "duckdb";
version = "trunk";
src = pkgs.fetchFromGitHub {
owner = "ak-coram";
repo = "cl-duckdb";
rev = "2f0df62f59fbede0addd8d72cf286f4007818a3e";
hash = "sha256-+jeOuXtCFZwMvF0XvlRaqTNHIAAFKMx6y1pz6u8Wxug=";
rev = "3ed1df5ba5c738a0b7fed7aa73632ec86f558d09";
hash = "sha256-AJMxhtDACe6WTwEOxLsC8y6uBaPqjt8HLRw/eIZI02E=";
};
systems = [ "duckdb" "duckdb/test" "duckdb/benchmark" ];
lispLibs = with super; [
lispLibs = with self; [
bordeaux-threads
cffi-libffi
cl-ascii-table
cl-spark
fiveam
cl-ppcre
frugal-uuid
let-plus
local-time
local-time-duration
periods
trivial-benchmark
serapeum
str
uuid
float-features
];
nativeLibs = with pkgs; [
duckdb libffi

View File

@ -0,0 +1,14 @@
--- a/libffi/libffi-types.lisp
+++ b/libffi/libffi-types.lisp
@@ -43,9 +43,6 @@
(pkg-config-cflags "libffi" :optional t)
-#+darwin
-(include "ffi/ffi.h")
-#-darwin
(include "ffi.h")
(cenum status
Diff finished. Sun Nov 13 00:23:10 2022

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "duckdb-engine";
version = "0.7.3";
version = "0.9.2";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -23,9 +23,11 @@ buildPythonPackage rec {
repo = "duckdb_engine";
owner = "Mause";
rev = "refs/tags/v${version}";
hash = "sha256-Z9m1+Bc/csWKdPDuwf82xX0qOiD1Y5LBgJjUlLntAO8=";
hash = "sha256-T02nGF+YlughRQPinb0I3NC6xsarh4+qRhG8YfhTvhI=";
};
patches = [ ./remote_data.patch ];
nativeBuildInputs = [
poetry-core
];
@ -42,8 +44,11 @@ buildPythonPackage rec {
disabledTests = [
# this test tries to download the httpfs extension
"test_preload_extension"
"test_motherduck"
# test should be skipped based on sqlalchemy version but isn't and fails
"test_commit"
# rowcount no longer generates an attribute error.
"test_rowcount"
];
nativeCheckInputs = [

View File

@ -0,0 +1,24 @@
diff --git a/duckdb_engine/tests/test_basic.py b/duckdb_engine/tests/test_basic.py
index 302636f..ed20f12 100644
--- a/duckdb_engine/tests/test_basic.py
+++ b/duckdb_engine/tests/test_basic.py
@@ -183,7 +183,6 @@ def test_get_views(engine: Engine) -> None:
@mark.skipif(os.uname().machine == "aarch64", reason="not supported on aarch64")
-@mark.remote_data
def test_preload_extension() -> None:
duckdb.default_connection.execute("INSTALL httpfs")
engine = create_engine(
diff --git a/duckdb_engine/tests/test_integration.py b/duckdb_engine/tests/test_integration.py
index 349c976..bf3dbaa 100644
--- a/duckdb_engine/tests/test_integration.py
+++ b/duckdb_engine/tests/test_integration.py
@@ -24,7 +24,6 @@ def test_integration(engine: Engine) -> None:
conn.execute(text("select * from test_df"))
-@mark.remote_data
@mark.skipif(
"dev" in duckdb.__version__, reason="md extension not available for dev builds" # type: ignore[attr-defined]
)

View File

@ -1,8 +1,10 @@
{ lib
, buildPythonPackage
, duckdb
, fsspec
, google-cloud-storage
, numpy
, openssl
, pandas
, psutil
, pybind11
@ -21,13 +23,13 @@ buildPythonPackage rec {
# 1. let nix control build cores
# 2. unconstrain setuptools_scm version
substituteInPlace setup.py \
--replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES" \
--replace "setuptools_scm<7.0.0" "setuptools_scm"
--replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
# avoid dependency on mypy
rm tests/stubs/test_stubs.py
# avoid dependency on mypy
rm tests/stubs/test_stubs.py
'';
BUILD_HTTPFS = 1;
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
@ -35,12 +37,15 @@ buildPythonPackage rec {
setuptools-scm
];
buildInputs = [ openssl ];
propagatedBuildInputs = [
numpy
pandas
];
nativeCheckInputs = [
fsspec
google-cloud-storage
psutil
pytestCheckHook
@ -55,6 +60,10 @@ buildPythonPackage rec {
export HOME="$(mktemp -d)"
'';
setupPyBuildFlags = [
"--inplace"
];
pythonImportsCheck = [
"duckdb"
];

View File

@ -130,6 +130,17 @@ buildPythonPackage rec {
# tries to download duckdb extensions
"--deselect=ibis/backends/duckdb/tests/test_register.py::test_register_sqlite"
"--deselect=ibis/backends/duckdb/tests/test_register.py::test_read_sqlite"
# duckdb does not respect sample_size=2 (reads 3 lines of csv).
"--deselect=ibis/backends/tests/test_register.py::test_csv_reregister_schema"
# duckdb fails with:
# "This function can not be called with an active transaction!, commit or abort the existing one first"
"--deselect=ibis/backends/tests/test_udf.py::test_vectorized_udf"
"--deselect=ibis/backends/tests/test_udf.py::test_map_merge_udf"
"--deselect=ibis/backends/tests/test_udf.py::test_udf"
"--deselect=ibis/backends/tests/test_udf.py::test_map_udf"
# pyarrow13 is not supported yet.
"--deselect=ibis/backends/tests/test_temporal.py::test_date_truncate"
"--deselect=ibis/backends/tests/test_temporal.py::test_integer_to_interval_timestamp"