Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/scripts/install-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ elif [ "$ENGINE" == "fabric" ]; then
rm packages-microsoft-prod.deb

ENGINE_DEPENDENCIES="msodbcsql18"
elif [ "$ENGINE" == "doris" ]; then
ENGINE_DEPENDENCIES="mysql-client"
sudo sysctl -w vm.max_map_count=2000000
sudo swapoff -a || true
fi

ALL_DEPENDENCIES="$COMMON_DEPENDENCIES $ENGINE_DEPENDENCIES"
Expand Down
29 changes: 29 additions & 0 deletions .github/scripts/wait-for-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,35 @@ db2_ready() {
done
}

doris_ready() {
probe_port 9030 || return 1
HOSTNAME=${DOCKER_HOSTNAME:-127.0.0.1}
if [ "$HOSTNAME" = "localhost" ]; then
HOSTNAME="127.0.0.1"
fi
INIT_SQL="ADMIN SET FRONTEND CONFIG ('force_olap_table_replication_num' = '1');"
if docker ps --format '{{.Names}}' 2>/dev/null | grep -qx 'doris-fe-01'; then
docker exec -i doris-fe-01 mysql -h127.0.0.1 -P9030 -uroot -e "SHOW BACKENDS\G" 2>/dev/null | grep -q "Alive: true" && \
docker exec -i doris-fe-01 mysql -h127.0.0.1 -P9030 -uroot -e "$INIT_SQL" 2>/dev/null
elif command -v mysql > /dev/null 2>&1; then
mysql -h "$HOSTNAME" -P 9030 -u root -e "SHOW BACKENDS\G" 2>/dev/null | grep -q "Alive: true" && \
mysql -h "$HOSTNAME" -P 9030 -u root -e "$INIT_SQL" 2>/dev/null
else
python3 -c "
import pymysql, sys
conn = pymysql.connect(host='$HOSTNAME', port=9030, user='root', autocommit=True)
with conn.cursor() as cur:
cur.execute('SHOW BACKENDS')
rows = cur.fetchall()
cols = [d[0] for d in cur.description]
alive_idx = cols.index('Alive')
if not rows or not any(str(r[alive_idx]).lower() == 'true' for r in rows):
sys.exit(1)
cur.execute(\"ADMIN SET FRONTEND CONFIG ('force_olap_table_replication_num' = '1')\")
" 2>/dev/null
fi
}

echo "Waiting for $ENGINE to be ready..."

READINESS_FUNC="${ENGINE}_ready"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ jobs:
clickhouse,
risingwave,
starrocks,
doris,
]
env:
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build:
python: "3.10"
jobs:
pre_build:
- pip install -e ".[athena,azuresql,bigframes,bigquery,clickhouse,databricks,dbt,dlt,gcppostgres,github,llm,mssql,mysql,mwaa,postgres,redshift,slack,snowflake,starrocks,trino,web,risingwave]"
- pip install -e ".[athena,azuresql,bigframes,bigquery,clickhouse,databricks,dbt,dlt,doris,gcppostgres,github,llm,mssql,mysql,mwaa,postgres,redshift,slack,snowflake,starrocks,trino,web,risingwave]"
- make api-docs

mkdocs:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ starrocks-test: engine-starrocks-up
db2-test: engine-db2-up
pytest -n auto -m "db2" --reruns 3 --junitxml=test-results/junit-db2.xml

doris-test: engine-doris-up
pytest -n auto -m "doris" --reruns 3 --junitxml=test-results/junit-doris.xml

#################
# Cloud Engines #
#################
Expand Down
2 changes: 2 additions & 0 deletions docs/guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ These pages describe the connection configuration options for each execution eng
* [BigQuery](../integrations/engines/bigquery.md)
* [ClickHouse](../integrations/engines/clickhouse.md)
* [Databricks](../integrations/engines/databricks.md)
* [Doris](../integrations/engines/doris.md)
* [DuckDB](../integrations/engines/duckdb.md)
* [Fabric](../integrations/engines/fabric.md)
* [MotherDuck](../integrations/engines/motherduck.md)
Expand Down Expand Up @@ -978,6 +979,7 @@ Unsupported state engines, even for development:
* [Spark](../integrations/engines/spark.md)
* [StarRocks](../integrations/engines/starrocks.md)
* [Trino](../integrations/engines/trino.md)
* [Doris](../integrations/engines/doris.md)

This example gateway configuration uses Snowflake for the data warehouse connection and Postgres for the state backend connection:

Expand Down
1 change: 1 addition & 0 deletions docs/guides/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ default_gateway: local_db
* [ClickHouse](../integrations/engines/clickhouse.md)
* [Databricks](../integrations/engines/databricks.md)
* [Db2](../integrations/engines/db2.md)
* [Doris](../integrations/engines/doris.md)
* [DuckDB](../integrations/engines/duckdb.md)
* [Fabric](../integrations/engines/fabric.md)
* [MotherDuck](../integrations/engines/motherduck.md)
Expand Down
1 change: 1 addition & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Other extras are required to use specific SQL engines, like Bigquery or Postgres
| Bigquery | `pip install "sqlmesh[bigquery]"` |
| ClickHouse | `pip install "sqlmesh[clickhouse]"` |
| Databricks | `pip install "sqlmesh[databricks]"` |
| Doris | `pip install "sqlmesh[doris]"` |
| Fabric | `pip install "sqlmesh[fabric]"` |
| GCP Postgres | `pip install "sqlmesh[gcppostgres]"` |
| MS SQL Server | `pip install "sqlmesh[mssql]"` |
Expand Down
Loading
Loading