From 13246db9414f30e72a26f5715cbe48b0426b294d Mon Sep 17 00:00:00 2001 From: lmangani Date: Sun, 22 Dec 2024 18:13:57 +0000 Subject: [PATCH] chsql_native --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- Makefile | 2 +- README.md | 4 ++-- src/lib.rs | 2 +- test/sql/{clickhouse_native.test => chsql_native.test} | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename test/sql/{clickhouse_native.test => chsql_native.test} (94%) diff --git a/Cargo.lock b/Cargo.lock index 1ca6e5f..b82f56d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -368,7 +368,7 @@ dependencies = [ ] [[package]] -name = "clickhouse_native" +name = "chsql_native" version = "0.1.0" dependencies = [ "byteorder", diff --git a/Cargo.toml b/Cargo.toml index baec7bd..62f2dad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "clickhouse_native" +name = "chsql_native" version = "0.1.0" edition = "2021" @@ -15,7 +15,7 @@ strip = true # src/wasm_lib.rs forwards to src/lib.rs so that we can change from cdylib # (that is needed while compiling natively) to staticlib (needed since the # actual linking will be done via emcc -name = "clickhouse_native" +name = "chsql_native" path = "src/wasm_lib.rs" crate-type = ["staticlib"] diff --git a/Makefile b/Makefile index 80651a5..3eeab01 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # TODO: these values are currently duplicated in lib.rs. There's a PR open in duckdb-rs that fixes this -EXTENSION_NAME=clickhouse_native +EXTENSION_NAME=chsql_native MINIMUM_DUCKDB_VERSION=v0.0.1 all: configure debug diff --git a/README.md b/README.md index ed55b58..394121e 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ This experimental rust extension allows reading ClickHouse Native Format databas diff --git a/src/lib.rs b/src/lib.rs index 25c1e48..af66e02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -395,7 +395,7 @@ impl VTab for ClickHouseVTab { } } -#[duckdb_entrypoint_c_api(ext_name = "clickhouse_native", min_duckdb_version = "v0.0.1")] +#[duckdb_entrypoint_c_api(ext_name = "chsql_native", min_duckdb_version = "v0.0.1")] pub unsafe fn extension_entrypoint(con: Connection) -> Result<(), Box> { con.register_table_function::("clickhouse_native")?; Ok(()) diff --git a/test/sql/clickhouse_native.test b/test/sql/chsql_native.test similarity index 94% rename from test/sql/clickhouse_native.test rename to test/sql/chsql_native.test index 1b7e081..a38262b 100644 --- a/test/sql/clickhouse_native.test +++ b/test/sql/chsql_native.test @@ -9,7 +9,7 @@ SELECT clickhouse_native('Sam'); Catalog Error: Scalar Function with name clickhouse_native does not exist! # Require statement will ensure the extension is loaded from now on -require clickhouse_native +require chsql_native require icu