Skip to content

Commit e91162f

Browse files
genezhangCopilot
andauthored
fix(click-to-expand): fix Neo4j Browser regression bugs from scope refactoring (#116)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6137e1b commit e91162f

File tree

17 files changed

+191
-189
lines changed

17 files changed

+191
-189
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,4 @@ tests/private/*.bak
144144
PR_*.md
145145
/WITH_CLAUSE_BUG_FIX.md
146146
notes/
147+
demos/*/docker-compose.override.yml

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [Unreleased]
1+
## [0.6.2-dev] - Unreleased
22

33
### 🚀 Features
44

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members = [
55

66
[package]
77
name = "clickgraph"
8-
version = "0.6.1"
8+
version = "0.6.2-dev"
99
edition = "2021"
1010
rust-version = "1.85"
1111

README.md

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,19 @@
1313
- There are huge volumes of data in ClickHouse databases, viewing them as graph data with graph analytics capability brings another level of abstraction and boosts productivity with graph tools, in ways beyond relational analytics alone.
1414
- Research shows relational analytics with columnar stores and vectorized execution engines like ClickHouse provide superior analytical performance and scalability to graph-native technologies, which usually leverage explicit adjacency representations and are more suitable for local-area graph traversals.
1515
- View-based graph analytics offer the benefits of zero-ETL without the hassle of data migration and duplicate cost, yet better performance and scalability than most of the native graph analytics options.
16-
- Neo4j Bolt protocol support gives instant access to the tools available, including graph visualization and the MCP server.
16+
- Neo4j Bolt protocol support gives access to the tools available based on the Bolt protocol.
1717
---
18-
## 🚀 What's New in v0.6.1 (January 12, 2026)
19-
20-
### Development Release: WITH Clause Fixes & GraphRAG Enhancements
21-
22-
**v0.6.1 brings critical WITH clause fixes, GraphRAG multi-type VLP support, and LDBC SNB benchmark progress (15/41 queries passing).**
18+
## 🚀 What's New in v0.6.2-dev
2319

2420
### Highlights ✨
2521

26-
- **WITH Clause Fixes** - Fixed CartesianProduct recursion and chained WITH CTE remapping (+6 LDBC queries)
27-
- **GraphRAG Multi-Type VLP** - Variable-length paths across heterogeneous graphs (18/20 tests passing)
28-
- **Per-MATCH WHERE** - OpenCypher-compliant consecutive MATCH clauses with individual WHERE clauses
29-
- **LDBC SNB Progress** - 15/41 queries passing (37%): IS queries 7/7 (100%), IC 4/14, BI 4/20
30-
- **Test Coverage** - 3000+ tests across unit, integration, and benchmark suites
31-
32-
### Key Features
33-
34-
- **WITH + MATCH Patterns** - Disconnected MATCH patterns separated by WITH now work correctly
35-
- Example: `MATCH (p:Person)-[:KNOWS*1..2]-(f) WITH DISTINCT f MATCH (f)<-[:HAS_CREATOR]-(post) RETURN f, post`
36-
- **Chained WITH Clauses** - 3+ level chained WITHs generate correct SQL (enables IC-1, IC-2)
37-
- **Configurable Type Inference** - `max_inferred_types` parameter for complex GraphRAG schemas (default: 5)
38-
- **OpenCypher Per-MATCH WHERE** - Each MATCH clause can have its own WHERE (9/9 tests passing)
39-
- **Multiple UNWIND Clauses** - Cartesian product support for multiple consecutive UNWIND clauses (e.g., `UNWIND [1,2] AS x UNWIND [10,20] AS y` → 4 rows)
40-
- **Pattern Comprehensions** - Extract values from graph patterns into lists with `[(pattern) | expression]` syntax
41-
42-
### Bug Fixes 🐛
43-
44-
- **Type inference** - Bottom-up processing for multi-hop pattern label resolution
45-
- **Denormalization metadata** - Copy `is_denormalized`, `from_node_properties`, `to_node_properties` from schema
46-
- **VLP ID columns** - Use relationship schema columns (`from_id`/`to_id`)
47-
- **Cycle prevention** - Skip for single-hop patterns (can't have cycles)
22+
- **Neo4j Browser Support** - Connect Neo4j Browser directly to ClickGraph via Bolt protocol for live graph visualization. See [`demos/neo4j-browser/`](demos/neo4j-browser/README.md) for a ready-to-run demo.
23+
- **Graph-Notebook Support** - Run Jupyter graph notebooks against your ClickHouse data using the `graph-notebook` library. See [`demos/graph-notebook/`](demos/graph-notebook/README.md) for setup instructions.
24+
- **Numerous rounds of refactoring** - help to improve the code quality, including the following.
25+
- **Improved WITH Clause Correctness** - Chained `WITH` queries (multi-step aggregation, filtering, and renaming) now produce correct results across a wider range of patterns.
26+
- **More Reliable Query Results** - Fixed result ordering, column projection in UNION queries, and variable resolution after `WITH` — queries return what Cypher semantics require.
27+
- **LDBC SNB Progress** - 14/37 benchmark queries passing (38%), up from 10/37 (27%).
28+
- **Test Coverage** - 1,032 unit tests passing; 3,026 integration tests at parity with prior release.
4829

4930
---
5031

@@ -62,17 +43,15 @@
6243
- **Use cases**: `ch.cityHash64()`, `ch.murmurHash3_64()`, `chagg.uniq()`, specialized aggregations
6344
- **Example**: `RETURN ch.cityHash64(u.email) AS hash`
6445

65-
### Benchmarks & Validation
46+
### Benchmarks
47+
48+
- **Ontime Flights** - a benchmark for airline flights illustrating the power/performance.
6649

6750
- **LDBC SNB (Work In Progress)** - Social Network Benchmark implementation
6851
- **Status**: Schema mapping complete, query adaptation in progress
6952
- **Scale**: Designed for scale factors 1-100 (1K-100M edges)
7053
- **Purpose**: Industry-standard graph database benchmarking
7154

72-
- **MCP Server Validation** - Model Context Protocol integration testing
73-
- **Status**: validated
74-
- **Purpose**: LLM tool integration for graph queries
75-
7655
### Quality Improvements
7756

7857
- **Error handling** - Removed `.unwrap()` landmines, proper Result/Option propagation
@@ -82,6 +61,7 @@
8261

8362
### Previous Major Features (v0.5.x)
8463

64+
- **Diverse schema variations** - To fit existing database schemas.
8565
- **Cross-table queries** - Zeek log correlation, multi-table JOINs (v0.5.4)
8666
- **Smart type inference** - Automatic node/relationship type inference (v0.5.4)
8767
- **FK-Edge patterns** - File systems, org charts with VLP (v0.5.4)
@@ -177,7 +157,7 @@ See [CHANGELOG.md](CHANGELOG.md) for complete release history.
177157
- **Session/request parameter**: Bolt session database or HTTP `schema_name` parameter
178158
- **Default schema**: Fallback to "default" schema
179159
- **Schema isolation**: Different schemas map same labels to different ClickHouse tables
180-
- **Dual Server Architecture**: HTTP and Bolt servers running simultaneously (both production-ready)
160+
- **Dual Server Architecture**: HTTP and Bolt servers running simultaneously
181161
- **Authentication Support**: Multiple authentication schemes including basic auth
182162

183163
### View-Based Graph Model
@@ -213,7 +193,7 @@ flowchart LR
213193

214194
**Three-tier architecture:** Graph clients → ClickGraph translator → ClickHouse database
215195

216-
Both protocols share the same underlying query engine and ClickHouse backend. Both are production-ready.
196+
Both protocols share the same underlying query engine and ClickHouse backend.
217197

218198
## 🚀 Quick Start
219199

@@ -556,14 +536,15 @@ See `docs/configuration.md` for complete configuration documentation.
556536

557537
## 🧪 Development Status
558538

559-
**Current Version**: v0.6.1 (January 12, 2026)
539+
**Current Version**: v0.6.2-dev
560540

561541
### Test Coverage
562-
-**Rust Unit Tests**: 534/534 passing (100%)
542+
-**Rust Unit Tests**: 1,032/1,032 passing (100%)
563543
-**Schema Variation Tests**: 73 tests across 4 schema types
564544
-**Benchmarks**: 14/14 passing (100%)
565545
-**E2E Tests**: Bolt 4/4, Cache 5/5 (100%)
566-
-**Pytest**: 3000+ (95+% passing)
546+
-**Pytest**: 3,026 passing (13 pre-existing failures, at parity with prior release)
547+
-**LDBC SNB**: 14/37 queries passing (38%) on mini dataset
567548

568549
### Key Features
569550
-**Polymorphic & Coupled Edge Tables**: Advanced schema patterns
@@ -585,7 +566,7 @@ See [STATUS.md](STATUS.md) and [KNOWN_ISSUES.md](KNOWN_ISSUES.md) for details.
585566
**Phase 2 (v0.5.0)** ✅ - Multi-tenancy, RBAC, auto-schema discovery
586567
**Phase 2.5 (v0.5.2)** ✅ - Schema variations (polymorphic, coupled edges)
587568
**Phase 2.6 (v0.5.3)** ✅ - Cypher functions (label, EXISTS, regex, collect)
588-
**Phase 3 (v0.6.1)** 🔄 - WITH clause fixes, GraphRAG support, LDBC SNB benchmark
569+
**Phase 3 (v0.6.x)** 🔄 - WITH clause scope redesign, GraphRAG support, LDBC SNB benchmark
589570

590571
See [ROADMAP.md](ROADMAP.md) for detailed feature tracking.
591572

STATUS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*Updated: February 19, 2026*
44

5-
## Current Version: v0.6.1
5+
## Current Version: v0.6.2-dev
66

77
Read-only Cypher-to-ClickHouse SQL query engine with Neo4j Browser compatibility.
88

demos/graph-notebook/docker-compose.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#
44
# Usage: docker-compose up
55
# Then open: http://localhost:8888 (token displayed in logs)
6-
#
7-
# Note: This uses local build. After release, use: image: genezhang/clickgraph:latest
86

97
version: '3.8'
108

@@ -28,13 +26,9 @@ services:
2826
volumes:
2927
- clickhouse_notebook_data:/var/lib/clickhouse
3028
- ../neo4j-browser/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
31-
- ../neo4j-browser/001-init.sh:/docker-entrypoint-initdb.d/001-init.sh:ro
3229

3330
clickgraph:
34-
# For now, build locally. After release, use: image: genezhang/clickgraph:latest
35-
build:
36-
context: ../..
37-
dockerfile: Dockerfile
31+
image: genezhang/clickgraph:v0.6.2-dev
3832
container_name: clickgraph-notebook-demo
3933
depends_on:
4034
clickhouse:

demos/neo4j-browser/docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ services:
3434
volumes:
3535
- clickhouse_demo_data:/var/lib/clickhouse
3636
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
37-
- ./001-init.sh:/docker-entrypoint-initdb.d/001-init.sh:ro
3837

3938
neo4j:
4039
image: neo4j:latest
@@ -56,10 +55,7 @@ services:
5655
- neo4j_demo_logs:/logs
5756

5857
clickgraph:
59-
# For now, build locally. After release, use: image: genezhang/clickgraph:latest
60-
build:
61-
context: ../..
62-
dockerfile: Dockerfile
58+
image: genezhang/clickgraph:v0.6.2-dev
6359
container_name: clickgraph-demo
6460
depends_on:
6561
clickhouse:

demos/neo4j-browser/init-db.sql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
-- ClickGraph Demo Data Initialization
22
-- Creates and populates demo tables for social network graph
3+
-- Note: MergeTree persists data across container restarts.
4+
-- This file runs automatically via docker-entrypoint-initdb.d on first container start.
35

46
-- Users table
57
CREATE TABLE IF NOT EXISTS social.users (
68
user_id UInt32,
79
name String,
810
email String,
911
created_at DateTime DEFAULT now()
10-
) ENGINE = Memory;
12+
) ENGINE = MergeTree() ORDER BY user_id;
1113

1214
-- Posts table
1315
CREATE TABLE IF NOT EXISTS social.posts (
1416
post_id UInt32,
1517
content String,
1618
created_at DateTime DEFAULT now()
17-
) ENGINE = Memory;
19+
) ENGINE = MergeTree() ORDER BY post_id;
1820

1921
-- AUTHORED relationship (User -> Post)
2022
CREATE TABLE IF NOT EXISTS social.post_authored (
2123
user_id UInt32,
2224
post_id UInt32,
2325
created_at DateTime DEFAULT now()
24-
) ENGINE = Memory;
26+
) ENGINE = MergeTree() ORDER BY (user_id, post_id);
2527

2628
-- LIKED relationship (User -> Post)
2729
CREATE TABLE IF NOT EXISTS social.post_likes (
2830
user_id UInt32,
2931
post_id UInt32,
3032
created_at DateTime DEFAULT now()
31-
) ENGINE = Memory;
33+
) ENGINE = MergeTree() ORDER BY (user_id, post_id);
3234

3335
-- User follows User relationship
3436
CREATE TABLE IF NOT EXISTS social.user_follows (
3537
follower_id UInt32,
3638
followed_id UInt32,
3739
created_at DateTime DEFAULT now()
38-
) ENGINE = Memory;
40+
) ENGINE = MergeTree() ORDER BY (follower_id, followed_id);
3941
-- Insert sample users (30 users)
4042
INSERT INTO social.users VALUES
4143
(1, 'Alice', 'alice@example.com', '2026-01-01 11:00:00'),

demos/neo4j-browser/setup.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@ echo ""
4646
echo "✓ All services ready!"
4747
echo ""
4848

49-
# Load demo data
50-
echo "📊 Loading demo data..."
51-
echo ""
52-
53-
bash "$DEMO_DIR/setup_demo_data.sh"
54-
55-
echo ""
56-
echo "✓ Demo data loaded!"
57-
echo ""
58-
5949
# Health checks
6050
echo "📋 Service Status:"
6151
echo ""

0 commit comments

Comments
 (0)