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
79 changes: 29 additions & 50 deletions .github/workflows/tpcds-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,45 +88,6 @@ env:
WGET_OPTS: "--tries=3 --timeout=30 -c"

jobs:
build-validator:
name: Build TPC-DS Validator
runs-on: ubuntu-24.04
steps:
- name: Cache TPC-DS Validator
uses: actions/cache@v4
id: cache-tpcds-validator
with:
key: tpcds-validator_${{ inputs.scalaver }}
path: target/tpcds-validator_${{ inputs.scalaver }}-0.1.0-SNAPSHOT-with-dependencies.jar

- name: Checkout TPC-DS Validator
uses: actions/checkout@v4
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
with:
repository: auron-project/tpcds-validator

- name: Setup Java and Maven cache
uses: actions/setup-java@v4
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
with:
distribution: 'adopt-hotspot'
java-version: ${{ inputs.javaver }}
cache: 'maven'

- name: Build TPC-DS Validator
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
run: ./build/mvn package -DskipTests -Pscala-${{ inputs.scalaver }}

- name: Upload TPC-DS Validator
uses: actions/upload-artifact@v4
with:
name: >
tpcds-validator-${{ inputs.sparkver }}_${{ inputs.scalaver }}-jdk-${{ inputs.javaver
}}${{ inputs.celebornver && format('-{0}', inputs.celebornver) || ''
}}${{ inputs.unifflever && format('-{0}', inputs.unifflever) || '' }}
path: target/tpcds-validator_${{ inputs.scalaver }}-0.1.0-SNAPSHOT-with-dependencies.jar
overwrite: true

build-auron-jar:
name: Build Auron JAR
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -217,10 +178,18 @@ jobs:
}}${{ inputs.unifflever && format('-{0}', inputs.unifflever) || '' }}
path: target/auron-${{ inputs.sparkver }}_${{ inputs.scalaver }}-pre-*.jar
overwrite: true
- name: Upload auron maven artifacts (Spark ${{ inputs.sparkver }}, Scala ${{ inputs.scalaver }}, JDK ${{ inputs.javaver }})
uses: actions/upload-artifact@v4
with:
name: auron-artifacts-${{ inputs.sparkver }}_${{ inputs.scalaver }}-jdk-${{ inputs.javaver
}}${{ inputs.celebornver && format('-{0}', inputs.celebornver) || ''
}}${{ inputs.unifflever && format('-{0}', inputs.unifflever) || '' }}
path: ~/.m2/repository/org/apache/auron
if-no-files-found: error

run-tpcds-test:
name: Run TPC-DS test ${{ matrix.query }}
needs: [build-validator, build-auron-jar]
needs: [build-auron-jar]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -280,13 +249,14 @@ jobs:
}}${{ inputs.celebornver && format('-{0}', inputs.celebornver) || ''
}}${{ inputs.unifflever && format('-{0}', inputs.unifflever) || '' }}

- name: Download TPC-DS Validator JAR
- name: Download auron maven artifacts
uses: actions/download-artifact@v4
with:
name: >
tpcds-validator-${{ inputs.sparkver }}_${{ inputs.scalaver }}-jdk-${{ inputs.javaver
}}${{ inputs.celebornver && format('-{0}', inputs.celebornver) || ''
auron-artifacts-${{ inputs.sparkver }}_${{ inputs.scalaver }}-jdk-${{ inputs.javaver
}}${{ inputs.celebornver && format('-{0}', inputs.celebornver) || ''
}}${{ inputs.unifflever && format('-{0}', inputs.unifflever) || '' }}
path: ~/.m2/repository/org/apache/auron

- name: Checkout TPC-DS Data
uses: actions/checkout@v4
Expand All @@ -297,7 +267,10 @@ jobs:
- name: Install Auron JAR
run: |
ls -la
cp auron-*${{ inputs.sparkver }}_${{ inputs.scalaver }}*.jar spark-bin-${{ inputs.sparkver }}_${{ inputs.scalaver }}/jars/
jar=$(ls -1 auron-${{ inputs.sparkver }}_${{ inputs.scalaver }}*.jar | head -n1)
[ -n "$jar" ] || { echo "No jar matched: auron-${{ inputs.sparkver }}_${{ inputs.scalaver }}*.jar"; exit 1; }
echo "AURON_SPARK_JAR=$jar" >> "$GITHUB_ENV"
cp "$jar" spark-bin-${{ inputs.sparkver }}_${{ inputs.scalaver }}/jars/

- name: Setup Java and Maven cache
uses: actions/setup-java@v4
Expand Down Expand Up @@ -400,16 +373,22 @@ jobs:
cp uniffle-bin-${{ steps.get-dependency-version.outputs.uniffleversion }}/jars/client/spark3/*.jar spark-bin-${{ inputs.sparkver }}_${{ inputs.scalaver }}/jars/

- name: Run TPC-DS Query ${{ matrix.query }}
env:
RUST_LOG: ERROR
RUST_BACKTRACE: 1
SPARK_VERSION: ${{ inputs.sparkver }}
SCALA_VERSION: ${{ inputs.scalaver }}
SPARK_HOME: spark-bin-${{ inputs.sparkver }}_${{ inputs.scalaver }}
run: |
ls -la
export RUST_LOG=ERROR
export RUST_BACKTRACE=1
export SCALA_VERSION=${{ inputs.scalaver }}
export SPARK_HOME=spark-bin-${{ inputs.sparkver }}_${{ inputs.scalaver }}
dev/run-tpcds-test \
ls -la ~/.m2/repository/org/apache/auron
dev/auron-it/run-it.sh \
${{ inputs.extrasparkconf }} \
--type tpcds \
--data-location dev/tpcds_1g \
--query-filter ${{ matrix.query }}
--query-filter ${{ matrix.query }} \
--result-check \
--plan-check

- name: Upload RSS log
if: ${{ failure() && (inputs.celebornver != '' || inputs.unifflever != '') }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ native-engine/_build

# exclude org.apache.auron.common.AuronBuildInfo
common/src/main/resources/auron-build-info.properties

.flattened-pom.xml
dependency-reduced-pom.xml
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ NOTICE*
docs/**
build/apache-maven-*/**
src/main/resources/auron-build-info.properties
**/tpcds-plan-stability/**
**/tpcds-queries/**
4 changes: 2 additions & 2 deletions auron-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ fi

BUILD_ARGS=()
if [[ "$SKIP_TESTS" == true ]]; then
BUILD_ARGS+=("package" "-DskipTests")
BUILD_ARGS+=("install" "-DskipTests")
else
BUILD_ARGS+=("package")
BUILD_ARGS+=("install")
fi

if [[ "$SPARK_TESTS" == true ]]; then
Expand Down
55 changes: 55 additions & 0 deletions dev/auron-it/local-run-tpcds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
set -ex

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
AURON_DIR="$SCRIPT_DIR/../.."

# TPC-DS Dataset Preparation
# 1. Download pre-generated 1GB TPC-DS dataset: https://github.com/auron-project/tpcds_1g
# 2. OR generate via databricks/tpcds-kit: https://github.com/databricks/tpcds-kit
# Place data in a readable directory (e.g., /tmp/tpcds_1g) post-generation.

# Run TPC-DS Benchmark (Vanilla Spark vs Auron)
# - Executes specified TPC-DS queries (all if --query-filter unspecified) with Vanilla Spark/Auron
# - Verifies query result consistency (enabled by default) and reports execution time and speedup (Vanilla/Auron)
$SCRIPT_DIR/run-it.sh \
--type tpcds \
--data-location /tmp/tpcds_1g \
--query-filter q1,q2,q3

# Run Only Auron plan stability check
# - Validates Auron physical plans against golden files.
$SCRIPT_DIR/run-it.sh \
--type tpcds \
--data-location /tmp/tpcds_1g \
--query-filter q1,q2,q3 \
--auron-only \
--plan-check

# Regenerate Golden Files for Plan Stability Check
# - Rewrites golden plan files using Auron plans for the current Spark version
$SCRIPT_DIR/run-it.sh \
--type tpcds \
--data-location /tmp/tpcds_1g \
--query-filter q1,q2,q3 \
--auron-only \
--regen-golden
Loading
Loading