about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRob <86313040+robert-manchester@users.noreply.github.com>2023-10-01 19:37:13 -0700
committerRob <86313040+robert-manchester@users.noreply.github.com>2023-10-01 19:37:13 -0700
commitbd4cc900a4255b68b803d45c796dd106c358e465 (patch)
treee5e2fd2ab4dffa241bb14e18d60eaa3abed6cdb2 /pkgs/development
parenta689220a5d7f84f85d36311bb0cf017061eb72d9 (diff)
parenta9d95ded63e499febe6d12c43e225407755f2cb4 (diff)
Merge branch 'duckdb_0.9.0' into duckdb-0.9_nohash
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/duckdb/default.nix49
-rw-r--r--pkgs/development/libraries/duckdb/version.patch80
-rw-r--r--pkgs/development/python-modules/duckdb-engine/default.nix2
-rw-r--r--pkgs/development/python-modules/duckdb-engine/remote_data.patch2
-rw-r--r--pkgs/development/python-modules/duckdb/default.nix3
-rw-r--r--pkgs/development/python-modules/duckdb/setup.patch22
6 files changed, 112 insertions, 46 deletions
diff --git a/pkgs/development/libraries/duckdb/default.nix b/pkgs/development/libraries/duckdb/default.nix
index 201a8533674e8..b844e0defd2f3 100644
--- a/pkgs/development/libraries/duckdb/default.nix
+++ b/pkgs/development/libraries/duckdb/default.nix
@@ -33,12 +33,7 @@ stdenv.mkDerivation rec {
     ++ lib.optionals withOdbc [ unixODBC ];
 
   cmakeFlags = [
-    # use similar flags to what is defined in ${src}/.github/workflow/{LinuxRelease,OSX}.yml
-    "-DBUILD_ICU_EXTENSION=ON"
-    "-DDEBUG_STACKTRACE=1"
-    "-DBUILD_PARQUET_EXTENSION=ON"
-    "-DDUCKDB_EXTENSION_CONFIGS=${src}/.github/config/bundled_extensions.cmake"
-    "-DBUILD_TPCH_EXTENSION=ON"
+    "-DDUCKDB_EXTENSION_CONFIGS=${src}/.github/config/in_tree_extensions.cmake"
     "-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}"
     "-DJDBC_DRIVER=${enableFeature withJdbc}"
   ] ++ lib.optionals doInstallCheck [
@@ -57,28 +52,42 @@ stdenv.mkDerivation rec {
   installCheckPhase =
     let
       excludes = map (pattern: "exclude:'${pattern}'") ([
-        "Test using a remote optimizer pass in case thats important to someone"
+        "[s3]"
         "Test closing database during long running query"
-        "test/fuzzer/pedro/buffer_manager_out_of_memory.test"
-        "test/sql/copy/csv/parallel/csv_parallel_httpfs.test"
-        "test/sql/copy/csv/parallel/test_parallel_csv.test"
-        "test/sql/copy/csv/test_csv_httpfs_prepared.test"
-        "test/sql/copy/csv/test_csv_httpfs.test"
+        "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/delta_byte_array_length_mismatch.test"
-        "test/sql/copy/parquet/delta_byte_array_multiple_pages.test"
-        "test/sql/copy/parquet/parquet_5968.test"
-        "test/sql/copy/parquet/snowflake_lineitem.test"
-        "test/sql/copy/parquet/test_parquet_force_download.test"
-        "test/sql/copy/parquet/test_parquet_remote_foreign_files.test"
         "test/sql/copy/parquet/test_parquet_remote.test"
+        "test/sql/copy/parquet/test_parquet_remote_foreign_files.test"
+        "test/sql/storage/compression/chimp/chimp_read.test"
+        "test/sql/storage/compression/chimp/chimp_read_float.test"
+        "test/sql/storage/compression/patas/patas_compression_ratio.test_coverage"
+        "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/settings/test_disabled_file_system_httpfs.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"
-
+        "test/sql/copy/parquet/delta_byte_array_length_mismatch.test"
+        "test/sql/function/timestamp/test_icu_strptime.test"
+        "test/sql/timezone/test_icu_timezone.test"
+        "test/sql/copy/parquet/snowflake_lineitem.test"
+        "test/sql/copy/parquet/test_parquet_force_download.test"
+        "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"
+        # test is order sensitive
+        "test/sql/copy/parquet/parquet_glob.test"
         # these are only hidden if no filters are passed in
         "[!hide]"
+        # this test apparently never terminates
+        "test/sql/copy/csv/auto/test_csv_auto.test"
       ] ++ lib.optionals stdenv.isAarch64 [
         "test/sql/aggregate/aggregates/test_kurtosis.test"
         "test/sql/aggregate/aggregates/test_skewness.test"
diff --git a/pkgs/development/libraries/duckdb/version.patch b/pkgs/development/libraries/duckdb/version.patch
new file mode 100644
index 0000000000000..9b368eac5dbc6
--- /dev/null
+++ b/pkgs/development/libraries/duckdb/version.patch
@@ -0,0 +1,80 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2b49e11288..0a4a69b9a0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -244,52 +244,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+   set(SUN TRUE)
+ endif()
+ 
+-find_package(Git)
+-if(Git_FOUND)
+-  if (NOT DEFINED GIT_COMMIT_HASH)
+-    execute_process(
+-            COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
+-            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-            RESULT_VARIABLE GIT_RESULT
+-            OUTPUT_VARIABLE GIT_COMMIT_HASH
+-            OUTPUT_STRIP_TRAILING_WHITESPACE)
+-  endif()
+-  execute_process(
+-          COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
+-          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-          OUTPUT_VARIABLE GIT_LAST_TAG
+-          OUTPUT_STRIP_TRAILING_WHITESPACE)
+-  execute_process(
+-          COMMAND ${GIT_EXECUTABLE} describe --tags --long
+-          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-          OUTPUT_VARIABLE GIT_ITERATION
+-          OUTPUT_STRIP_TRAILING_WHITESPACE)
+-else()
+-  message("Git NOT FOUND")
+-endif()
+-
+-if(GIT_RESULT EQUAL "0")
+-  string(REGEX REPLACE "v([0-9]+).[0-9]+.[0-9]+" "\\1" DUCKDB_MAJOR_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE "v[0-9]+.([0-9]+).[0-9]+" "\\1" DUCKDB_MINOR_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE "v[0-9]+.[0-9]+.([0-9]+)" "\\1" DUCKDB_PATCH_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE ".*-([0-9]+)-.*" "\\1" DUCKDB_DEV_ITERATION "${GIT_ITERATION}")
+-
+-  if(DUCKDB_DEV_ITERATION EQUAL 0)
+-    # on a tag; directly use the version
+-    set(DUCKDB_VERSION "${GIT_LAST_TAG}")
+-  else()
+-    # not on a tag, increment the patch version by one and add a -devX suffix
+-    math(EXPR DUCKDB_PATCH_VERSION "${DUCKDB_PATCH_VERSION}+1")
+-    set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}")
+-  endif()
+-else()
+-  # fallback for when building from tarball
+-  set(DUCKDB_MAJOR_VERSION 0)
+-  set(DUCKDB_MINOR_VERSION 0)
+-  set(DUCKDB_PATCH_VERSION 1)
+-  set(DUCKDB_DEV_ITERATION 0)
+-  set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}")
+-endif()
++set(DUCKDB_VERSION "@DUCKDB_VERSION@")
+ 
+ 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=[
diff --git a/pkgs/development/python-modules/duckdb-engine/default.nix b/pkgs/development/python-modules/duckdb-engine/default.nix
index 9634c8fa128c8..ab82edb0893b7 100644
--- a/pkgs/development/python-modules/duckdb-engine/default.nix
+++ b/pkgs/development/python-modules/duckdb-engine/default.nix
@@ -26,7 +26,7 @@ buildPythonPackage rec {
     hash = "sha256-T02nGF+YlughRQPinb0I3NC6xsarh4+qRhG8YfhTvhI=";
   };
 
-   patches = [ ./remote_data.patch ];
+  patches = [ ./remote_data.patch ];
 
   nativeBuildInputs = [
     poetry-core
diff --git a/pkgs/development/python-modules/duckdb-engine/remote_data.patch b/pkgs/development/python-modules/duckdb-engine/remote_data.patch
index dd53c00f65097..1c887acf6caea 100644
--- a/pkgs/development/python-modules/duckdb-engine/remote_data.patch
+++ b/pkgs/development/python-modules/duckdb-engine/remote_data.patch
@@ -21,4 +21,4 @@ index 349c976..bf3dbaa 100644
 -@mark.remote_data
  @mark.skipif(
      "dev" in duckdb.__version__, reason="md extension not available for dev builds"  # type: ignore[attr-defined]
- )
\ No newline at end of file
+ )
diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix
index 0d313f1a12064..810ee8efe921f 100644
--- a/pkgs/development/python-modules/duckdb/default.nix
+++ b/pkgs/development/python-modules/duckdb/default.nix
@@ -2,7 +2,6 @@
 , buildPythonPackage
 , duckdb
 , fsspec
-, git
 , google-cloud-storage
 , numpy
 , openssl
@@ -18,7 +17,6 @@ buildPythonPackage rec {
   format = "setuptools";
 
   BUILD_HTTPFS = 1;
-  patches = [ ./setup.patch ];
 
   postPatch = ''
     # we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
@@ -33,6 +31,7 @@ buildPythonPackage rec {
     rm tests/stubs/test_stubs.py
   '';
 
+  BUILD_HTTPFS = 1;
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/duckdb/setup.patch b/pkgs/development/python-modules/duckdb/setup.patch
deleted file mode 100644
index 9649f18117602..0000000000000
--- a/pkgs/development/python-modules/duckdb/setup.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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=[
\ No newline at end of file