MCPcopy Index your code
hub / github.com/StarRocks/starrocks

github.com/StarRocks/starrocks @4.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 4.1.2 ↗ · + Follow
125,117 symbols 661,725 edges 9,926 files 9,445 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Download | Docs | Benchmarks | Demo

JAVA&C++ Commit Activities Open Issues Website Slack Twitter Gurubase

StarRocks is the world's fastest open query engine for sub-second, ad-hoc analytics both on and off the data lakehouse. With average query performance 3x faster than other popular alternatives, StarRocks is a query engine that eliminates the need for denormalization and adapts to your use cases, without having to move your data or rewrite SQL. A Linux Foundation project.

Learn more 👉🏻 What Is StarRocks: Features and Use Cases, Join StarRocks Summit 2025!

<img src="https://cdn.starrocks.io/static/github/community.gif">

Features

  • 🚀 Native vectorized SQL engine: StarRocks adopts vectorization technology to make full use of the parallel computing power of CPU, achieving sub-second query returns in multi-dimensional analyses, which is 5 to 10 times faster than previous systems.
  • 📊 Standard SQL: StarRocks supports ANSI SQL syntax (fully supported TPC-H and TPC-DS). It is also compatible with the MySQL protocol. Various clients and BI software can be used to access StarRocks.
  • 💡 Smart query optimization: StarRocks can optimize complex queries through CBO (Cost Based Optimizer). With a better execution plan, the data analysis efficiency will be greatly improved.
  • ⚡ Real-time update: The updated model of StarRocks can perform upsert/delete operations according to the primary key, and achieve efficient query while concurrent updates.
  • 🪟 Intelligent materialized view: The materialized view of StarRocks can be automatically updated during the data import and automatically selected when the query is executed.
  • ✨ Querying data in data lakes directly: StarRocks allows direct access to data from Apache Hive™, Apache Iceberg™, Delta Lake™ and Apache Hudi™ without importing.
  • 🎛️ Resource management: This feature allows StarRocks to limit resource consumption for queries and implement isolation and efficient use of resources among tenants in the same cluster.
  • 💠 Easy to maintain: Simple architecture makes StarRocks easy to deploy, maintain and scale out. StarRocks tunes its query plan agilely, balances the resources when the cluster is scaled in or out, and recovers the data replica under node failure automatically.

Architecture Overview

<img src="https://github.com/StarRocks/starrocks/raw/4.1.2/images/arch.png">

StarRocks’s streamlined architecture is mainly composed of two modules: Frontend (FE) and Backend (BE). The entire system eliminates single points of failure through seamless and horizontal scaling of FE and BE, as well as replication of metadata and data.

Starting from version 3.0, StarRocks supports a new shared-data architecture, which can provide better scalability and lower costs.

<img src="https://github.com/StarRocks/starrocks/raw/4.1.2/docs/en/_assets/shared-data.png" width="55%" height="55%">

Resources

📚 Read the docs

Section Description
Quick Starts How-tos and Tutorials.
Deploy Learn how to run and configure StarRocks.
Docs Full documentation.
Blogs StarRocks deep dive and user stories.

❓ Get support

- Slack community: join technical discussions, ask questions, and meet other users! - YouTube channel: subscribe to the latest video tutorials and webcasts. - GitHub issues: report an issue with StarRocks.

Contributing to StarRocks

We welcome all kinds of contributions from the community, individuals and partners. We owe our success to your active involvement.

  1. See Contributing.md to get started.
  2. Set up StarRocks development environment:
  3. IDE Setup
  4. Compile StarRocks with Docker
  5. Deploy StarRocks manually
  6. Understand our GitHub workflow for opening a pull request; use this PR Template when submitting a pull request.
  7. Pick a good first issue and start contributing.

📝 License: StarRocks is licensed under Apache License 2.0.

👥 Community Membership: Learn more about different contributor roles in StarRocks community.

💬 Developer Group: Please join our Google Groups to discuss StarRocks features, project directions, issues, pull requests, or share suggestions.

Used By

This project is used by the following companies. Learn more about their use cases:

Extension points exported contracts — how you extend this code

ThrowingRunnable (Interface)
A runnable that can throw any checked exception. [112 implementers]
fe/fe-core/src/test/java/com/starrocks/common/ExceptionChecker.java
RollupTreeBuilder (Interface)
(no doc) [123 implementers]
fe/plugin/spark-dpp/src/main/java/com/starrocks/load/loadv2/dpp/RollupTreeBuilder.java
ParseNode (Interface)
(no doc) [73 implementers]
fe/fe-parser/src/main/java/com/starrocks/sql/ast/ParseNode.java
GsonPreProcessable (Interface)
(no doc) [37 implementers]
fe/fe-spi/src/main/java/com/starrocks/persist/gson/GsonPreProcessable.java
GenericExceptionAction (Interface)
(no doc) [112 implementers]
java-extensions/hadoop-ext/src/main/java/com/starrocks/connector/hadoop/GenericExceptionAction.java
ColumnValue (Interface)
(no doc) [12 implementers]
java-extensions/jni-connector/src/main/java/com/starrocks/jni/connector/ColumnValue.java
StreamLoadDataFormat (Interface)
(no doc) [4 implementers]
contrib/trino-connector/src/main/java/com/starrocks/data/load/stream/StreamLoadDataFormat.java
AccessControlChecker (Interface)
A lambda function that throws AccessDeniedException [172 implementers]
fe/fe-core/src/main/java/com/starrocks/sql/analyzer/Authorizer.java

Core symbols most depended-on inside this repo

get
called by 31532
fe/fe-core/src/main/java/com/starrocks/common/util/HashRing.java
size
called by 25542
fe/fe-core/src/main/java/com/starrocks/qe/scheduler/slot/SlotScheduleAlgorithm.java
add
called by 14902
fe/fe-core/src/main/java/com/starrocks/qe/scheduler/slot/SlotScheduleAlgorithm.java
move
called by 8999
be/src/formats/orc/apache-orc/c++/include/orc/orc-config.hh
getCurrentState
called by 7700
fe/fe-core/src/main/java/com/starrocks/server/GlobalStateMgr.java
append
called by 7092
fe/fe-core/src/main/java/com/starrocks/common/io/Text.java
emplace_back
called by 6793
be/src/util/priority_queue_inl.h
create
called by 6692
be/src/util/moodycamel/concurrentqueue.h

Shape

Method 101,912
Class 15,958
Function 6,440
Enum 597
Interface 192
Route 18

Languages

Java62%
C++36%
Python2%
TypeScript1%
C1%

Modules by API surface

fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java787 symbols
fe/fe-core/src/main/java/com/starrocks/sql/parser/AstBuilder.java566 symbols
webroot/be/d3.v2.js398 symbols
be/src/util/phmap/phmap_base.h387 symbols
be/src/util/phmap/phmap.h364 symbols
fe/fe-parser/src/main/java/com/starrocks/sql/ast/AstVisitor.java314 symbols
be/src/util/phmap/btree.h307 symbols
fe/fe-core/src/test/java/com/starrocks/qe/RedirectStatusTest.java269 symbols
fe/fe-core/src/main/java/com/starrocks/qe/RedirectStatus.java269 symbols
fe/fe-core/src/main/java/com/starrocks/catalog/OlapTable.java256 symbols
fe/fe-core/src/test/java/com/starrocks/sql/plan/ViewPlanTest.java250 symbols
java-extensions/hadoop-ext/src/main/java/org/apache/hadoop/fs/FileSystem.java233 symbols

Datastores touched

(mysql)Database · 1 repos
jdbc_testDatabase · 1 repos
db_nameDatabase · 1 repos
datax_test1Database · 1 repos
datax_test2Database · 1 repos
sys_deviceDatabase · 1 repos
db_nameDatabase · 1 repos
dbDatabase · 1 repos

For agents

$ claude mcp add starrocks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact