[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
35/93: gnu: Add apache-orc.
From: |
guix-commits |
Subject: |
35/93: gnu: Add apache-orc. |
Date: |
Sun, 5 May 2024 16:44:51 -0400 (EDT) |
rekado pushed a commit to branch wip-python-team
in repository guix.
commit 442eba98be21518423f2cf0a10d1fa5d6c7865ca
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Apr 30 18:36:14 2024 +0200
gnu: Add apache-orc.
* gnu/packages/databases.scm (apache-orc): New variable.
Change-Id: I9e7df4a03a5d2f258ff44d9705f539f9fc925a99
---
gnu/packages/databases.scm | 84 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 238ba34053..8ad73e400a 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4510,6 +4510,90 @@ transforms idiomatic python function calls to
well-formed SQL queries.")
the SQL language using a syntax that reflects the resulting query.")
(license license:asl2.0)))
+(define-public apache-orc
+ (package
+ (name "apache-orc")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apache/orc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1fi6d045wakks0x8clplyxgal342kljqjql7vq5gbd6a2qnaz6m2"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:build-type "Release"
+ #:configure-flags
+ #~(list "-DBUILD_JAVA=OFF"
+ "-DINSTALL_VENDORED_LIBS=OFF"
+ "-DCMAKE_CXX_FLAGS=-fPIC"
+ (string-append "-DGTEST_HOME=" #$(this-package-native-input
"googletest"))
+ (string-append "-DZSTD_HOME=" (assoc-ref %build-inputs
"zstd:lib"))
+ (string-append "-DZLIB_HOME=" #$(this-package-input "zlib"))
+ (string-append "-DPROTOBUF_HOME=" #$(this-package-input
"protobuf"))
+ (string-append "-DLZ4_HOME=" #$(this-package-input "lz4"))
+ (string-append "-DSNAPPY_HOME=" #$(this-package-input "snappy")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-bad-test
+ (lambda _
+ ;; This one test fails with an obscure error:
+ ;;
+ ;; Expected: (std::string::npos) != (error.find(error_msg)),
+ ;; actual: 18446744073709551615 vs 18446744073709551615
+ (substitute* "tools/test/TestFileScan.cc"
+ (("findProgram\\(\"tools/src/orc-scan\"\\);" m)
+ (string-append m "return;")))))
+ (add-after 'unpack 'do-not-download-orc-format
+ (lambda _
+ (substitute* "cmake_modules/ThirdpartyToolchain.cmake"
+ (("URL \"https://archive.apache.org/dist/orc/orc-format.*")
+ (string-append "URL \"file://"
+ #$(this-package-native-input "orc-format")
+ "\"\n")))))
+ (add-after 'unpack 'timezone-fallback
+ (lambda _
+ ;; In the build container we don't have /etc/localtime
+ (substitute* "c++/src/Timezone.cc"
+ (("return getTimezoneByFilename\\(LOCAL_TIMEZONE\\);")
+ "if
(!std::filesystem::exists(std::filesystem::path(LOCAL_TIMEZONE))) {
+ return getTimezoneByName(\"UTC\");
+}
+return getTimezoneByFilename(LOCAL_TIMEZONE);"))))
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZDIR" (search-input-directory inputs
+ "share/zoneinfo")))))))
+ (inputs
+ `(("lz4" ,lz4)
+ ("protobuf" ,protobuf)
+ ("snappy" ,snappy)
+ ("zlib" ,zlib "static")
+ ("zstd" ,zstd)
+ ("zstd:lib" ,zstd "lib")))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("orc-format" ,(origin
+ (method url-fetch)
+ (uri
"https://archive.apache.org/dist/orc/orc-format-1.0.0/\
+orc-format-1.0.0.tar.gz")
+ (sha256
+ (base32
+
"1mccbna3mqhhlqs4pw0fa4pgjnq4c41jhxrh84mq27sbz5gsx7vk"))))
+ ("pkg-config" ,pkg-config)
+ ("tzdata" ,tzdata-for-tests)))
+ (home-page "https://orc.apache.org/")
+ (synopsis "Columnar storage for Hadoop workloads")
+ (description "ORC is a self-describing type-aware columnar file format
+designed for Hadoop workloads. It is optimized for large streaming reads, but
+with integrated support for finding required rows quickly.")
+ (license license:asl2.0)))
+
;; There are many wrappers for this in other languages. When touching, please
;; be sure to ensure all dependencies continue to build.
(define-public apache-arrow
- 09/93: gnu: Add python-pyct., (continued)
- 09/93: gnu: Add python-pyct., guix-commits, 2024/05/05
- 11/93: gnu: Add python-colorcet., guix-commits, 2024/05/05
- 14/93: gnu: Add rust-amd-0.2., guix-commits, 2024/05/05
- 18/93: gnu: Add python-qdldl., guix-commits, 2024/05/05
- 20/93: gnu: Add python-ecos., guix-commits, 2024/05/05
- 29/93: gnu: python-pyjanitor: Update to 0.27.0., guix-commits, 2024/05/05
- 25/93: gnu: python-pandas: Default to version 2.x., guix-commits, 2024/05/05
- 26/93: gnu: python-xarray: Disable tests that are known to fail., guix-commits, 2024/05/05
- 28/93: gnu: tadbit: Use G-expression., guix-commits, 2024/05/05
- 32/93: gnu: python-pandas-2: Fix version., guix-commits, 2024/05/05
- 35/93: gnu: Add apache-orc.,
guix-commits <=
- 27/93: gnu: r-reticulate: Update to 1.36.1., guix-commits, 2024/05/05
- 43/93: gnu: Add python-scikit-build-core., guix-commits, 2024/05/05
- 46/93: gnu: Add python-array-api-compat., guix-commits, 2024/05/05
- 53/93: Revert "gnu: python-numpy: Update to 1.26.0.", guix-commits, 2024/05/05
- 55/93: gnu: python-pandas-stubs: Accept numpy 1.23., guix-commits, 2024/05/05
- 57/93: gnu: python-umap-learn: Disable failing test., guix-commits, 2024/05/05
- 58/93: gnu: python-dask: Propagate python-dask-expr., guix-commits, 2024/05/05
- 15/93: gnu: Add python-clarabel., guix-commits, 2024/05/05
- 56/93: gnu: python-umap-learn: Update to 0.5.6., guix-commits, 2024/05/05
- 80/93: gnu: python-statmake: Adjust tests and version checks., guix-commits, 2024/05/05