Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f1dc0a2
feat(singlestoredb): initial SingleStoreDB backend implementation
kesmit13 Aug 21, 2025
fee5fde
feat(singlestoredb): implement comprehensive data type support (Phase 2)
kesmit13 Aug 21, 2025
e31e97a
feat(singlestoredb): add comprehensive backend implementation
kesmit13 Aug 21, 2025
3033031
fix(singlestoredb): improve backend implementation and configuration
kesmit13 Aug 22, 2025
5f83c9f
feat(singlestoredb): complete Phase 5 documentation implementation
kesmit13 Aug 22, 2025
30396bc
feat(singlestoredb): complete Phase 6 feature implementation
kesmit13 Aug 22, 2025
8b79032
feat(singlestoredb): complete Phase 7 performance optimization implem…
kesmit13 Aug 22, 2025
5349cb6
fix(singlestoredb): migrate from mysql to singlestore dialect in SQLGlot
kesmit13 Aug 22, 2025
cee9e64
fix(singlestoredb): resolve remaining test failures and exception han…
kesmit13 Aug 22, 2025
fe2ab8c
fix(singlestoredb): resolve 17 test failures and improve success rate…
kesmit13 Aug 22, 2025
2fccc2f
feat(singlestoredb): enhance type parameter preservation for DATETIME…
kesmit13 Aug 22, 2025
112c1d4
fix(singlestoredb): improve data type parsing for VARCHAR, TEXT, and …
kesmit13 Aug 22, 2025
ca9bcd6
fix(singlestoredb): resolve KeyError in create_table by ensuring type…
kesmit13 Aug 23, 2025
6c0eafa
fix(singlestoredb): add database property to Backend class
kesmit13 Aug 23, 2025
ac92045
fix(singlestoredb): replace SOUNDEX with REVERSE in UDF test
kesmit13 Aug 23, 2025
e61f9d8
fix(singlestoredb): resolve test_zero_timestamp_data ordering issue
kesmit13 Aug 23, 2025
5296596
feat(singlestoredb): add SingleStoreDB to general backend test suite
kesmit13 Aug 26, 2025
8fe936d
feat(tests): add singlestoredb markings alongside mysql test markings
kesmit13 Aug 26, 2025
695c1aa
fix(singlestoredb): resolve TO_DATE syntax errors and enhance tempora…
kesmit13 Aug 27, 2025
43720e8
feat(singlestoredb): fix string operations and improve test compatibi…
kesmit13 Aug 27, 2025
6367c21
fix(singlestoredb): fix table overwrite and JSON unwrap operations
kesmit13 Aug 27, 2025
ec933d2
fix(singlestoredb): fix timestamp literal generation and set operations
kesmit13 Aug 27, 2025
beff202
fix(singlestoredb): fix array test failures and improve literal handling
kesmit13 Aug 27, 2025
2971906
fix(singlestoredb): enhance temporal operations with proper format co…
kesmit13 Aug 28, 2025
85ded6f
fix(singlestoredb): comprehensive temporal operations support
kesmit13 Aug 28, 2025
95ca072
Copy functionality from MySQL; add list and drop operations
kesmit13 Aug 28, 2025
c536853
Add functionality from previous Ibis backend version
kesmit13 Aug 28, 2025
7cf43ae
Allow more flexible connection parameters
kesmit13 Aug 28, 2025
3c8ab81
fix(singlestoredb): improve connection management consistency
kesmit13 Aug 28, 2025
0ce732e
fix(singlestoredb): complete migration from _safe_raw_sql to begin() …
kesmit13 Aug 28, 2025
81a6ec5
fix(singlestoredb): resolve PyArrow boolean conversion in interactive…
kesmit13 Aug 28, 2025
c5aadbc
fix(singlestoredb): resolve JSONDecodeError in JSON to PyArrow conver…
kesmit13 Aug 28, 2025
f9dceaf
fix(singlestoredb): resolve string equality comparison in test_substi…
kesmit13 Aug 28, 2025
14690ba
fix(singlestoredb): resolve compiler test failures with time handling…
kesmit13 Aug 28, 2025
56f4b79
refactor(singlestoredb): streamline data type conversion and JSON han…
kesmit13 Aug 28, 2025
5db4254
fix(singlestoredb): add positional-only parameter markers for signatu…
kesmit13 Aug 28, 2025
f8642ff
feat(singlestoredb): implement RowID operation support
kesmit13 Aug 28, 2025
d85d8ce
fix(singlestoredb): handle BOOLEAN type mapping differences between c…
kesmit13 Aug 28, 2025
71cb6e5
fix(singlestoredb): comprehensive string operations support
kesmit13 Aug 28, 2025
4efbd4d
fix(singlestoredb): enable 14+ string operations and improve LOCATE f…
kesmit13 Aug 29, 2025
2260c64
fix(singlestoredb): enable XOR operations, NULLS ordering and geopand…
kesmit13 Aug 29, 2025
9244f12
fix(singlestoredb): add validation for unsupported complex types in t…
kesmit13 Aug 29, 2025
fa03171
fix(singlestoredb): fix StringFind implementation to properly handle …
kesmit13 Aug 29, 2025
b24603e
fix(singlestoredb): remove list_catalogs method to fix catalog consis…
kesmit13 Aug 29, 2025
81b77c0
fix(singlestoredb): resolve test_dot_sql failures by improving SQL pa…
kesmit13 Aug 29, 2025
18bc0c6
fix(singlestoredb): add missing SQL compilation test snapshots
kesmit13 Aug 29, 2025
9eb3998
fix(singlestoredb): resolve test failures in UUID and string find ope…
kesmit13 Aug 29, 2025
ea087ba
fix(singlestoredb): resolve test failures for timestamp, JSON, and ta…
kesmit13 Aug 29, 2025
3bd5183
fix(singlestoredb): fix window function test failures
kesmit13 Aug 29, 2025
1b90e14
fix(singlestoredb): resolve remaining test failures and improve type …
kesmit13 Aug 29, 2025
f5d3665
fix(singlestoredb): resolve IN operator cast syntax issues in aggrega…
kesmit13 Aug 30, 2025
8989017
fix(singlestoredb): finalize backend implementation and test fixes
kesmit13 Sep 2, 2025
f1a98ce
fix(singlestoredb): clean up obsolete FindInSet comment
kesmit13 Sep 2, 2025
911bbfb
docs(singlestoredb): comprehensive README.md update with accurate bac…
kesmit13 Sep 2, 2025
6ca7de2
fix(singlestoredb): improve Docker Compose configuration
kesmit13 Sep 2, 2025
9b23f47
chore(nix): improve Nix configuration formatting and organization
kesmit13 Sep 2, 2025
1fc72ce
feat(singlestoredb): enhance backend with improved datatypes and comp…
kesmit13 Sep 4, 2025
4813b26
docs: add SingleStoreDB backend to README and update backend count
kesmit13 Sep 4, 2025
9bdb859
chore: update requirements-dev.txt dependencies
kesmit13 Sep 4, 2025
76511de
fix(singlestoredb): resolve test failures and improve SQL generation
kesmit13 Sep 4, 2025
96a0d9f
fix(singlestoredb): resolve pandas/pyarrow import issue and restore t…
kesmit13 Sep 4, 2025
35cfb7a
fix(singlestoredb): consolidate data type handling and clean up imple…
kesmit13 Sep 5, 2025
1ebbbd0
chore: remove singlestoredb dependency from core requirements
kesmit13 Sep 5, 2025
0ccddab
fix(singlestoredb): remove singlestoredb from core dependencies
kesmit13 Sep 5, 2025
21c8058
fix(singlestoredb): improve numeric precision and SET column handling
kesmit13 Sep 5, 2025
35163ab
fix(sql): apply nullable parameter when resolving unknown type strings
kesmit13 Sep 5, 2025
30a2c3e
chore(deps): update singlestoredb version
kesmit13 Oct 23, 2025
897ddbf
chore: ignore .env.local
kesmit13 Oct 23, 2025
bab4193
chore: update uv.lock
kesmit13 Oct 23, 2025
4e346a8
fix(singlestoredb): test data types fix for null
kesmit13 Oct 23, 2025
43ffa93
chore: update requirements
kesmit13 Oct 24, 2025
bf14065
feat(singlestoredb): add vector type support
kesmit13 Oct 24, 2025
2a7c876
refactor(singlestoredb): simplify backend implementation and add docu…
kesmit13 Oct 27, 2025
c43a81a
chore(singlestoredb): pin Docker image version and refactor table rename
kesmit13 Oct 27, 2025
d249e72
docs(singlestoredb): change yields to returns
kesmit13 Oct 27, 2025
535f6be
chore: unify singlestoredb dependency to version 1.16.0
kesmit13 Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ venv/
ENV/
env.bak/
venv.bak/
.env.local

# OS generated files
.directory
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ This allows you to combine the flexibility of Python with the scale and performa

## Backends

Ibis supports nearly 20 backends:
Ibis supports 20 backends:

- [Apache DataFusion](https://ibis-project.org/backends/datafusion/)
- [Apache Druid](https://ibis-project.org/backends/druid/)
Expand All @@ -151,6 +151,7 @@ Ibis supports nearly 20 backends:
- [Polars](https://ibis-project.org/backends/polars/)
- [PostgreSQL](https://ibis-project.org/backends/postgresql/)
- [RisingWave](https://ibis-project.org/backends/risingwave/)
- [SingleStoreDB](https://ibis-project.org/backends/singlestoredb/)
- [SQL Server](https://ibis-project.org/backends/mssql/)
- [SQLite](https://ibis-project.org/backends/sqlite/)
- [Snowflake](https://ibis-project.org/backends/snowflake)
Expand Down
134 changes: 134 additions & 0 deletions ci/schema/singlestoredb.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
DROP TABLE IF EXISTS diamonds;

CREATE TABLE diamonds (
carat FLOAT,
cut TEXT,
color TEXT,
clarity TEXT,
depth FLOAT,
`table` FLOAT,
price BIGINT,
x FLOAT,
y FLOAT,
z FLOAT
) DEFAULT CHARACTER SET = utf8;

DROP TABLE IF EXISTS astronauts;

CREATE TABLE astronauts (
`id` BIGINT,
`number` BIGINT,
`nationwide_number` BIGINT,
`name` TEXT,
`original_name` TEXT,
`sex` TEXT,
`year_of_birth` BIGINT,
`nationality` TEXT,
`military_civilian` TEXT,
`selection` TEXT,
`year_of_selection` BIGINT,
`mission_number` BIGINT,
`total_number_of_missions` BIGINT,
`occupation` TEXT,
`year_of_mission` BIGINT,
`mission_title` TEXT,
`ascend_shuttle` TEXT,
`in_orbit` TEXT,
`descend_shuttle` TEXT,
`hours_mission` FLOAT,
`total_hrs_sum` FLOAT,
`field21` BIGINT,
`eva_hrs_mission` FLOAT,
`total_eva_hrs` FLOAT
);

DROP TABLE IF EXISTS batting;

CREATE TABLE batting (
`playerID` VARCHAR(255),
`yearID` BIGINT,
stint BIGINT,
`teamID` VARCHAR(7),
`lgID` VARCHAR(7),
`G` BIGINT,
`AB` BIGINT,
`R` BIGINT,
`H` BIGINT,
`X2B` BIGINT,
`X3B` BIGINT,
`HR` BIGINT,
`RBI` BIGINT,
`SB` BIGINT,
`CS` BIGINT,
`BB` BIGINT,
`SO` BIGINT,
`IBB` BIGINT NULL,
`HBP` BIGINT NULL,
`SH` BIGINT NULL,
`SF` BIGINT NULL,
`GIDP` BIGINT NULL
) DEFAULT CHARACTER SET = utf8;

DROP TABLE IF EXISTS awards_players;

CREATE TABLE awards_players (
`playerID` VARCHAR(255),
`awardID` VARCHAR(255),
`yearID` BIGINT,
`lgID` VARCHAR(7),
tie VARCHAR(7),
notes VARCHAR(255)
) DEFAULT CHARACTER SET = utf8;

DROP TABLE IF EXISTS functional_alltypes;

CREATE TABLE functional_alltypes (
id INTEGER,
bool_col BOOLEAN,
tinyint_col TINYINT,
smallint_col SMALLINT,
int_col INTEGER,
bigint_col BIGINT,
float_col FLOAT,
double_col DOUBLE,
date_string_col TEXT,
string_col TEXT,
timestamp_col DATETIME,
year INTEGER,
month INTEGER
) DEFAULT CHARACTER SET = utf8;

DROP TABLE IF EXISTS json_t;

CREATE TABLE IF NOT EXISTS json_t (rowid BIGINT, js JSON);

INSERT INTO json_t VALUES
(1, '{"a": [1,2,3,4], "b": 1}'),
(2, '{"a":null,"b":2}'),
(3, '{"a":"foo", "c":null}'),
(4, 'null'),
(5, '[42,47,55]'),
(6, '[]'),
(7, '"a"'),
(8, '""'),
(9, '"b"'),
(10, NULL),
(11, 'true'),
(12, 'false'),
(13, '42'),
(14, '37.37');

DROP TABLE IF EXISTS win;

CREATE TABLE win (g TEXT, x BIGINT NOT NULL, y BIGINT);
INSERT INTO win VALUES
('a', 0, 3),
('a', 1, 2),
('a', 2, 0),
('a', 3, 1),
('a', 4, 1);

DROP TABLE IF EXISTS topk;

CREATE TABLE topk (x BIGINT);
INSERT INTO topk VALUES (1), (1), (NULL);
27 changes: 27 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ services:
- mysql:/data
- $PWD/docker/mysql:/docker-entrypoint-initdb.d:ro

singlestoredb:
environment:
ROOT_PASSWORD: ibis_testing
SINGLESTORE_LICENSE: "" # Optional license key
SINGLESTOREDB_DATABASE: ibis_testing
SINGLESTOREDB_PASSWORD: ibis_testing
SINGLESTOREDB_USER: root
SINGLESTOREDB_PORT: 3307
healthcheck:
interval: 1s
retries: 20
test:
- CMD-SHELL
- sdb-admin query --host 127.0.0.1 --user root --password ibis_testing --port 3306 --sql 'select 1'
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.65
ports:
- 3307:3306 # Use 3307 to avoid conflict with MySQL
- 9089:9000 # Data API (use 9089 to avoid conflicts)
# - 9088:8080 # SingleStore Studio UI (use 9088 to avoid conflicts)
networks:
- singlestoredb
volumes:
- singlestoredb:/data
- $PWD/docker/singlestoredb:/docker-entrypoint-initdb.d:ro

postgres:
environment:
POSTGRES_PASSWORD: postgres
Expand Down Expand Up @@ -618,6 +643,7 @@ networks:
mssql:
clickhouse:
postgres:
singlestoredb:
trino:
druid:
oracle:
Expand All @@ -633,6 +659,7 @@ volumes:
mysql:
oracle:
postgres:
singlestoredb:
exasol:
impala:
risingwave:
Expand Down
43 changes: 43 additions & 0 deletions docker/singlestoredb/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
-- SingleStoreDB initialization script for Ibis testing
-- This script sets up the basic database and user for testing

-- Create the testing database
CREATE DATABASE IF NOT EXISTS ibis_testing;

-- Use the testing database
USE ibis_testing;

-- Create a test user with appropriate permissions
-- Note: SingleStoreDB uses MySQL-compatible user management
CREATE USER IF NOT EXISTS 'ibis'@'%' IDENTIFIED BY 'ibis';
GRANT ALL PRIVILEGES ON ibis_testing.* TO 'ibis'@'%';

-- Create some basic test tables for validation
CREATE TABLE IF NOT EXISTS simple_table (
id INT PRIMARY KEY,
name VARCHAR(100),
value DECIMAL(10,2)
);

-- Insert some test data
INSERT IGNORE INTO simple_table VALUES
(1, 'test1', 100.50),
(2, 'test2', 200.75),
(3, 'test3', 300.25);

-- Create a table demonstrating SingleStoreDB-specific types
CREATE TABLE IF NOT EXISTS singlestore_types (
id INT PRIMARY KEY AUTO_INCREMENT,
json_data JSON,
binary_data BLOB,
geom_data GEOMETRY,
timestamp_col TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Insert test data for SingleStoreDB types
INSERT IGNORE INTO singlestore_types (json_data, binary_data, geom_data) VALUES
('{"key": "value1", "number": 123}', UNHEX('48656C6C6F'), POINT(1, 1)),
('{"key": "value2", "array": [1,2,3]}', UNHEX('576F726C64'), POINT(2, 2));

-- Show that the initialization completed
SELECT 'SingleStoreDB initialization completed successfully' AS status;
1 change: 1 addition & 0 deletions docs/_tabsets/install.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ backends = [
{"name": "PostgreSQL", "module": "postgres"},
{"name": "PySpark", "module": "pyspark"},
{"name": "RisingWave", "module": "risingwave"},
{"name": "SingleStoreDB", "module": "singlestoredb"},
{"name": "Snowflake", "module": "snowflake"},
{"name": "SQLite", "module": "sqlite"},
{"name": "Trino", "module": "trino"},
Expand Down
111 changes: 111 additions & 0 deletions docs/backends/singlestoredb.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# SingleStoreDB

[https://www.singlestore.com](https://www.singlestore.com)

![](https://img.shields.io/badge/memtables-fallback-yellow?style=flat-square) ![](https://img.shields.io/badge/inputs-SingleStoreDB tables-blue?style=flat-square) ![](https://img.shields.io/badge/outputs-SingleStoreDB tables | CSV | pandas | Parquet | PyArrow-orange?style=flat-square)

## Install

Install Ibis and dependencies for the SingleStoreDB backend:

::: {.panel-tabset}

## `pip`

Install with the `singlestoredb` extra:

```{.bash}
pip install 'ibis-framework[singlestoredb]'
```

And connect:

```{.python}
import ibis

con = ibis.singlestoredb.connect() # <1>
```

1. Adjust connection parameters as needed.

## `conda`

Install for SingleStoreDB:

```{.bash}
conda install -c conda-forge ibis-singlestoredb
```

And connect:

```{.python}
import ibis

con = ibis.singlestoredb.connect() # <1>
```

1. Adjust connection parameters as needed.

## `mamba`

Install for SingleStoreDB:

```{.bash}
mamba install -c conda-forge ibis-singlestoredb
```

And connect:

```{.python}
import ibis

con = ibis.singlestoredb.connect() # <1>
```

1. Adjust connection parameters as needed.

:::

## Connect

### `ibis.singlestoredb.connect`

```python
con = ibis.singlestoredb.connect(
user="username",
password="password",
host="hostname",
port=3306,
database="database",
)
```

::: {.callout-note}
`ibis.singlestoredb.connect` is a thin wrapper around [`ibis.backends.singlestoredb.Backend.do_connect`](#ibis.backends.singlestoredb.Backend.do_connect).
:::

### Connection Parameters

```{python}
#| echo: false
#| output: asis
from _utils import render_do_connect

render_do_connect("singlestoredb")
```

### `ibis.connect` URL format

In addition to `ibis.singlestoredb.connect`, you can also connect to SingleStoreDB by
passing a properly-formatted SingleStoreDB connection URL to `ibis.connect`:

```python
con = ibis.connect(f"singlestoredb://{user}:{password}@{host}:{port}/{database}")
```

```{python}
#| echo: false
BACKEND = "SingleStoreDB"
```

{{< include ./_templates/api.qmd >}}
1 change: 1 addition & 0 deletions docs/backends_sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def to_greyish(hex_code, grey_value=128):
"PostgreSQL",
"PySpark",
"RisingWave",
"SingleStoreDB",
"Snowflake",
"SQLite",
"Theseus",
Expand Down
Loading
Loading