From da687777fb313ae3a806156c123c7f7eb09e7098 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Thu, 27 Jun 2024 20:53:25 -0700 Subject: [PATCH 1/5] test adding extension description --- duckdb | 2 +- src/h3_extension.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/duckdb b/duckdb index 1f98600..8e156b7 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 1f98600c2cf8722a6d2f2d805bb4af5e701319fc +Subproject commit 8e156b731861917931c33a5194d55d12bf378412 diff --git a/src/h3_extension.cpp b/src/h3_extension.cpp index 481e909..8e31635 100644 --- a/src/h3_extension.cpp +++ b/src/h3_extension.cpp @@ -1,4 +1,5 @@ #define DUCKDB_EXTENSION_MAIN +#include "h3_common.hpp" #include "h3_extension.hpp" #include "duckdb/catalog/catalog_entry/macro_catalog_entry.hpp" @@ -21,6 +22,11 @@ void H3Extension::Load(DuckDB &db) { } con.Commit(); + + std::string description = StringUtil::Format( + "Hierarchical hexagonal geospatial indexing system (v%d.%d.%d)", + H3_VERSION_MAJOR, H3_VERSION_MINOR, H3_VERSION_PATCH); + db.instance->SetExtensionDescription("h3", description); } std::string H3Extension::Name() { return "h3"; } From 249d3603278158884eee12bfc37c14100d9fad6b Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Fri, 5 Jul 2024 09:18:40 -0700 Subject: [PATCH 2/5] update readme for ocmmunity extensions instructions --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ec1d7d5..3da2723 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,9 @@ This is a [DuckDB](https://duckdb.org) extension that adds support for the [H3 d # Install -Run DuckDB with the unsigned option: -```sh -duckdb -unsigned -``` - -Load the extension: +Load from the [community extensions repository](https://community-extensions.duckdb.org/extensions/h3.html): ```SQL -INSTALL h3 FROM 'https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev'; +INSTALL h3 FROM community; LOAD h3; ``` @@ -28,10 +23,6 @@ Or, using the integer API, which generally has better performance: SELECT h3_cell_to_latlng(586265647244115967); ``` -## Download - -If you want to directly download the latest version of the extension: [Linux AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_amd64/h3.duckdb_extension.gz) [Linux AMD64 GCC4](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_amd64_gcc4/h3.duckdb_extension.gz) [Linux Arm64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_arm64/h3.duckdb_extension.gz) [OSX AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/osx_amd64/h3.duckdb_extension.gz) [OSX Arm64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/osx_arm64/h3.duckdb_extension.gz) [wasm eh](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_eh/h3.duckdb_extension.wasm) [wasm mvp](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_mvp/h3.duckdb_extension.wasm) [wasm threads](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_threads/h3.duckdb_extension.wasm) [Windows AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/windows_amd64/h3.duckdb_extension.gz) - # Implemented functions This extension implements the entire [H3 API](https://h3geo.org/docs/api/indexing). The full list of functions is below. @@ -104,6 +95,21 @@ one to use. The unsigned and signed APIs are identical. Many functions also supp * i: Supports UBIGINT and BIGINT input and output. (TODO for these to support VARCHAR too.) * u: Supports UBIGINT output only. +# Alternative download / install + +If you'd like to install the H3 extension from the version published here, rather than the community extension version, you will need to run DuckDB with the unsigned option: +```sh +duckdb -unsigned +``` + +Load the extension: +```SQL +INSTALL h3 FROM 'https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev'; +LOAD h3; +``` + +If you want to directly download the latest version of the extension: [Linux AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_amd64/h3.duckdb_extension.gz) [Linux AMD64 GCC4](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_amd64_gcc4/h3.duckdb_extension.gz) [Linux Arm64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/linux_arm64/h3.duckdb_extension.gz) [OSX AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/osx_amd64/h3.duckdb_extension.gz) [OSX Arm64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/osx_arm64/h3.duckdb_extension.gz) [wasm eh](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_eh/h3.duckdb_extension.wasm) [wasm mvp](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_mvp/h3.duckdb_extension.wasm) [wasm threads](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/wasm_threads/h3.duckdb_extension.wasm) [Windows AMD64](https://pub-cc26a6fd5d8240078bd0c2e0623393a5.r2.dev/v1.0.0/windows_amd64/h3.duckdb_extension.gz) + # Development To build, type: From 4cbb8f4225c128033775154248fdd5e879ffd12e Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Mon, 8 Jul 2024 08:58:43 -0700 Subject: [PATCH 3/5] update extension-ci-tools --- README.md | 2 +- extension-ci-tools | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3da2723..deff072 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is a [DuckDB](https://duckdb.org) extension that adds support for the [H3 discrete global grid system](https://github.com/uber/h3/), so you can index points and geometries to hexagons in SQL. -# Install +# Get started Load from the [community extensions repository](https://community-extensions.duckdb.org/extensions/h3.html): ```SQL diff --git a/extension-ci-tools b/extension-ci-tools index c0cc931..df7fc51 160000 --- a/extension-ci-tools +++ b/extension-ci-tools @@ -1 +1 @@ -Subproject commit c0cc9319492bfa38344c2f28bd35f2304c74cdde +Subproject commit df7fc5178e1fd2deb22c7f874321f63e686b52a4 From 5643de27da2b747a3a07acae3fedee663bec9e12 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Mon, 8 Jul 2024 09:25:02 -0700 Subject: [PATCH 4/5] revert duckdb --- duckdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckdb b/duckdb index 8e156b7..1f98600 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 8e156b731861917931c33a5194d55d12bf378412 +Subproject commit 1f98600c2cf8722a6d2f2d805bb4af5e701319fc From 2e1dc8d160ee7d3cfa70b03b60f9800583885a9e Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Mon, 8 Jul 2024 09:26:04 -0700 Subject: [PATCH 5/5] revert source file --- src/h3_extension.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/h3_extension.cpp b/src/h3_extension.cpp index 8e31635..481e909 100644 --- a/src/h3_extension.cpp +++ b/src/h3_extension.cpp @@ -1,5 +1,4 @@ #define DUCKDB_EXTENSION_MAIN -#include "h3_common.hpp" #include "h3_extension.hpp" #include "duckdb/catalog/catalog_entry/macro_catalog_entry.hpp" @@ -22,11 +21,6 @@ void H3Extension::Load(DuckDB &db) { } con.Commit(); - - std::string description = StringUtil::Format( - "Hierarchical hexagonal geospatial indexing system (v%d.%d.%d)", - H3_VERSION_MAJOR, H3_VERSION_MINOR, H3_VERSION_PATCH); - db.instance->SetExtensionDescription("h3", description); } std::string H3Extension::Name() { return "h3"; }