Skip to content

pierre-b/gocube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoCube - Cube.js Schema Compiler in Go

This project is a Go implementation of the Cube.js schema compiler, designed to transform Cube.js schema definitions into SQL queries.

Project Structure

gocube/
├── go.mod
├── go.sum
├── README.md
├── internal/
│   ├── query/          # Core query processing
│   ├── adapters/       # Database adapters (PostgreSQL, MySQL, etc.)
│   ├── filters/        # Filter processing
│   ├── dimensions/     # Dimension and measure processing
│   ├── joins/          # Join processing
│   ├── preagg/         # Pre-aggregation support
│   ├── params/         # Parameter allocation
│   └── compiler/       # Schema compilation
├── pkg/
│   └── schema/         # Public schema types and definitions
├── examples/
└── tests/

Development Approach

We're using Test-Driven Development (TDD) to port the Cube.js schema compiler functionality:

  1. Write failing tests based on Cube.js behavior
  2. Implement minimal code to pass the tests
  3. Refactor and optimize while keeping tests green

Getting Started

go mod tidy
go test ./...

Porting Progress

Based on our analysis of the Cube.js schema compiler, we're implementing in phases:

Phase 1: Core Infrastructure (Current Focus)

  • Base Query Engine
  • Parameter Allocation
  • PostgreSQL & MySQL Adapters
  • Filter Processing
  • Dimension/Measure Processing
  • Time Dimensions

Phase 2: Advanced Features

  • Join Processing
  • Ordering and Limiting
  • Advanced Filters
  • Pre-aggregations

Phase 3: Additional Database Support

  • SQL Server Adapter
  • BigQuery Adapter
  • Snowflake Adapter
  • ClickHouse Adapter

Phase 4: Optimization & Advanced Features

  • Query Caching
  • Query Optimization
  • Advanced Pre-aggregations
  • Query Planning

About

Golang implementation of Cubejs schema compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages