feat(doris-driver): Add Apache Doris database driver#10283
Open
dataroaring wants to merge 1 commit intocube-js:masterfrom
Open
feat(doris-driver): Add Apache Doris database driver#10283dataroaring wants to merge 1 commit intocube-js:masterfrom
dataroaring wants to merge 1 commit intocube-js:masterfrom
Conversation
- Add new @cubejs-backend/doris-driver package - Doris is MySQL protocol compatible, uses mysql npm package - Supports Doris-specific types: LARGEINT, DATEV2, DATETIMEV2, STRING - Features: - Connection pooling via generic-pool - Stream query support - Batch inserts (1000 rows per batch) - 64-character table name validation - No foreign key support (Doris limitation) - Default port 9030 (Doris FE query port) - Register driver in DriverDependencies and DatabaseType - Map to MysqlQuery dialect in QueryBuilder - Add unit tests and integration test infrastructure
There was a problem hiding this comment.
Pull request overview
This PR adds Apache Doris database driver support to Cube.js. Doris is a MySQL protocol-compatible database, so the driver leverages the existing mysql npm package with Doris-specific adaptations. Key features include connection pooling, streaming queries, batch inserts (1000 rows per batch), and support for Doris-specific types (LARGEINT, DATEV2, DATETIMEV2, STRING) alongside MySQL-compatible types.
- New @cubejs-backend/doris-driver package with full driver implementation
- Integration with Cube.js infrastructure (driver registration, query builder mapping)
- Comprehensive test suite including unit tests, smoke tests, and driver test suite integration
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cubejs-doris-driver/src/DorisDriver.ts | Core driver implementation with MySQL protocol compatibility, Doris-specific type mappings, connection pooling, streaming support, and table operations |
| packages/cubejs-doris-driver/src/index.ts | Package exports for DorisDriver |
| packages/cubejs-doris-driver/index.js | CommonJS module wrapper for TypeScript exports |
| packages/cubejs-doris-driver/package.json | Package configuration with dependencies (mysql, generic-pool) and build scripts |
| packages/cubejs-doris-driver/tsconfig.json | TypeScript compiler configuration |
| packages/cubejs-doris-driver/jest.config.js | Jest test configuration |
| packages/cubejs-doris-driver/test/DorisDriver.test.ts | Comprehensive unit tests covering UTF-8 handling, type mappings, boolean fields, streaming, and table name validation |
| packages/cubejs-doris-driver/test/doris.db.runner.ts | Test helper to create DorisDriver instances using MySQL containers |
| packages/cubejs-testing-shared/src/db-container-runners/doris.ts | DorisDBRunner for test container management using MySQL as stand-in |
| packages/cubejs-testing-shared/src/db-container-runners/index.ts | Export DorisDBRunner from test container runners |
| packages/cubejs-testing/test/driver-doris.test.ts | Driver test suite execution for Doris with various configurations |
| packages/cubejs-testing/test/driver-test-suite.ts | Add 'doris' to supported driver types |
| packages/cubejs-testing/test/smoke-doris.test.ts | Smoke tests for Doris integration with Birdbox |
| packages/cubejs-testing/birdbox-fixtures/doris/schema/Orders.js | Test schema fixture for Doris smoke tests |
| packages/cubejs-server-core/src/core/types.ts | Add 'doris' to DatabaseType union |
| packages/cubejs-server-core/src/core/DriverDependencies.ts | Register @cubejs-backend/doris-driver package mapping |
| packages/cubejs-schema-compiler/src/adapter/QueryBuilder.ts | Map Doris to MysqlQuery dialect adapter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
Any comments? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check List