Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
28be8e3
feat(singlestoredb): initial SingleStoreDB backend implementation
kesmit13 Aug 21, 2025
2beedc0
feat(singlestoredb): implement comprehensive data type support (Phase 2)
kesmit13 Aug 21, 2025
a816945
feat(singlestoredb): add comprehensive backend implementation
kesmit13 Aug 21, 2025
9d2ce23
fix(singlestoredb): improve backend implementation and configuration
kesmit13 Aug 22, 2025
57188d5
feat(singlestoredb): complete Phase 5 documentation implementation
kesmit13 Aug 22, 2025
e9df1b0
feat(singlestoredb): complete Phase 6 feature implementation
kesmit13 Aug 22, 2025
cad2c93
feat(singlestoredb): complete Phase 7 performance optimization implem…
kesmit13 Aug 22, 2025
9ee594a
fix(singlestoredb): migrate from mysql to singlestore dialect in SQLGlot
kesmit13 Aug 22, 2025
416f924
fix(singlestoredb): resolve remaining test failures and exception han…
kesmit13 Aug 22, 2025
1ea6016
fix(singlestoredb): resolve 17 test failures and improve success rate…
kesmit13 Aug 22, 2025
213fb4f
feat(singlestoredb): enhance type parameter preservation for DATETIME…
kesmit13 Aug 22, 2025
70ee155
fix(singlestoredb): improve data type parsing for VARCHAR, TEXT, and …
kesmit13 Aug 22, 2025
0abee90
fix(singlestoredb): resolve KeyError in create_table by ensuring type…
kesmit13 Aug 23, 2025
b809f9b
fix(singlestoredb): add database property to Backend class
kesmit13 Aug 23, 2025
40f993a
fix(singlestoredb): replace SOUNDEX with REVERSE in UDF test
kesmit13 Aug 23, 2025
ef0aa1a
fix(singlestoredb): resolve test_zero_timestamp_data ordering issue
kesmit13 Aug 23, 2025
d5c3d73
feat(singlestoredb): add SingleStoreDB to general backend test suite
kesmit13 Aug 26, 2025
6de054e
feat(tests): add singlestoredb markings alongside mysql test markings
kesmit13 Aug 26, 2025
339776a
fix(singlestoredb): resolve TO_DATE syntax errors and enhance tempora…
kesmit13 Aug 27, 2025
dc70d4b
feat(singlestoredb): fix string operations and improve test compatibi…
kesmit13 Aug 27, 2025
db225d9
fix(singlestoredb): fix table overwrite and JSON unwrap operations
kesmit13 Aug 27, 2025
8d257b6
fix(singlestoredb): fix timestamp literal generation and set operations
kesmit13 Aug 27, 2025
5a90024
fix(singlestoredb): fix array test failures and improve literal handling
kesmit13 Aug 27, 2025
73b89db
fix(singlestoredb): enhance temporal operations with proper format co…
kesmit13 Aug 28, 2025
142796a
fix(singlestoredb): comprehensive temporal operations support
kesmit13 Aug 28, 2025
f3c4fde
Copy functionality from MySQL; add list and drop operations
kesmit13 Aug 28, 2025
126f41c
Add functionality from previous Ibis backend version
kesmit13 Aug 28, 2025
71994db
Allow more flexible connection parameters
kesmit13 Aug 28, 2025
a05e8c8
fix(singlestoredb): improve connection management consistency
kesmit13 Aug 28, 2025
1ce4ce5
fix(singlestoredb): complete migration from _safe_raw_sql to begin() …
kesmit13 Aug 28, 2025
927465f
fix(singlestoredb): resolve PyArrow boolean conversion in interactive…
kesmit13 Aug 28, 2025
34756de
fix(singlestoredb): resolve JSONDecodeError in JSON to PyArrow conver…
kesmit13 Aug 28, 2025
50c8d26
fix(singlestoredb): resolve string equality comparison in test_substi…
kesmit13 Aug 28, 2025
234eeef
fix(singlestoredb): resolve compiler test failures with time handling…
kesmit13 Aug 28, 2025
e70e084
refactor(singlestoredb): streamline data type conversion and JSON han…
kesmit13 Aug 28, 2025
46a7aa0
fix(singlestoredb): add positional-only parameter markers for signatu…
kesmit13 Aug 28, 2025
b7e85a0
feat(singlestoredb): implement RowID operation support
kesmit13 Aug 28, 2025
2c2e966
fix(singlestoredb): handle BOOLEAN type mapping differences between c…
kesmit13 Aug 28, 2025
a92f0b8
fix(singlestoredb): comprehensive string operations support
kesmit13 Aug 28, 2025
0ece0e0
fix(singlestoredb): enable 14+ string operations and improve LOCATE f…
kesmit13 Aug 29, 2025
51cf9d7
fix(singlestoredb): enable XOR operations, NULLS ordering and geopand…
kesmit13 Aug 29, 2025
d276cda
fix(singlestoredb): add validation for unsupported complex types in t…
kesmit13 Aug 29, 2025
906acad
fix(singlestoredb): fix StringFind implementation to properly handle …
kesmit13 Aug 29, 2025
90755b2
fix(singlestoredb): remove list_catalogs method to fix catalog consis…
kesmit13 Aug 29, 2025
acbd530
fix(singlestoredb): resolve test_dot_sql failures by improving SQL pa…
kesmit13 Aug 29, 2025
484b863
fix(singlestoredb): add missing SQL compilation test snapshots
kesmit13 Aug 29, 2025
bbd2dbf
fix(singlestoredb): resolve test failures in UUID and string find ope…
kesmit13 Aug 29, 2025
43e6f31
fix(singlestoredb): resolve test failures for timestamp, JSON, and ta…
kesmit13 Aug 29, 2025
a8de249
fix(singlestoredb): fix window function test failures
kesmit13 Aug 29, 2025
c3d66fa
fix(singlestoredb): resolve remaining test failures and improve type …
kesmit13 Aug 29, 2025
0b6cb4a
fix(singlestoredb): resolve IN operator cast syntax issues in aggrega…
kesmit13 Aug 30, 2025
5d96180
fix(singlestoredb): finalize backend implementation and test fixes
kesmit13 Sep 2, 2025
a54be35
fix(singlestoredb): clean up obsolete FindInSet comment
kesmit13 Sep 2, 2025
841b7db
docs(singlestoredb): comprehensive README.md update with accurate bac…
kesmit13 Sep 2, 2025
1ad044e
fix(singlestoredb): improve Docker Compose configuration
kesmit13 Sep 2, 2025
3a02a55
chore(nix): improve Nix configuration formatting and organization
kesmit13 Sep 2, 2025
84edbd7
feat(singlestoredb): enhance backend with improved datatypes and comp…
kesmit13 Sep 4, 2025
e35f5b5
docs: add SingleStoreDB backend to README and update backend count
kesmit13 Sep 4, 2025
472bb01
chore: update requirements-dev.txt dependencies
kesmit13 Sep 4, 2025
a516b98
fix(singlestoredb): resolve test failures and improve SQL generation
kesmit13 Sep 4, 2025
ee1d7a9
fix(singlestoredb): resolve pandas/pyarrow import issue and restore t…
kesmit13 Sep 4, 2025
1ea1749
fix(singlestoredb): consolidate data type handling and clean up imple…
kesmit13 Sep 5, 2025
6c2b2a6
chore: remove singlestoredb dependency from core requirements
kesmit13 Sep 5, 2025
4f29196
fix(singlestoredb): remove singlestoredb from core dependencies
kesmit13 Sep 5, 2025
c9976f4
fix(singlestoredb): improve numeric precision and SET column handling
kesmit13 Sep 5, 2025
99afe5a
fix(sql): apply nullable parameter when resolving unknown type strings
kesmit13 Sep 5, 2025
2a6714e
chore(deps): update singlestoredb version
kesmit13 Oct 23, 2025
dbb7aca
chore: ignore .env.local
kesmit13 Oct 23, 2025
5cc8b17
chore: update uv.lock
kesmit13 Oct 23, 2025
3263af4
fix(singlestoredb): test data types fix for null
kesmit13 Oct 23, 2025
c996e1d
chore: update requirements
kesmit13 Oct 24, 2025
f565866
feat(singlestoredb): add vector type support
kesmit13 Oct 24, 2025
833dc15
refactor(singlestoredb): simplify backend implementation and add docu…
kesmit13 Oct 27, 2025
a73b3a4
chore(singlestoredb): pin Docker image version and refactor table rename
kesmit13 Oct 27, 2025
2116bb1
docs(singlestoredb): change yields to returns
kesmit13 Oct 27, 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