forked from IGinX-THU/IGinX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(tpc-h): add tpc-h tests with pushdown (IGinX-THU#477)
增加TPC-H下推测试
- Loading branch information
Showing
4 changed files
with
207 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
name: "TPC-H Regression Test With Push Down" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
java-matrix: | ||
description: "The java version to run the test on" | ||
type: string | ||
required: false | ||
default: '["8"]' | ||
python-matrix: | ||
description: "The python version to run the test on" | ||
type: string | ||
required: false | ||
default: '["3.9"]' | ||
os-matrix: | ||
description: "The operating system to run the test on" | ||
type: string | ||
required: false | ||
default: '["ubuntu-latest", "macos-latest", "windows-latest"]' | ||
metadata-matrix: | ||
description: "The metadata to run the test on" | ||
type: string | ||
required: false | ||
default: '["zookeeper", "etcd"]' | ||
db-matrix: | ||
description: "The database to run the test on" | ||
type: string | ||
required: false | ||
default: '["IoTDB12", "InfluxDB", "FileSystem", "PostgreSQL", "Redis", "MongoDB", "MySQL"]' | ||
|
||
jobs: | ||
TPC-H-Test-Push_Down: | ||
timeout-minutes: 35 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: ${{ fromJSON(inputs.java-matrix) }} | ||
python-version: ${{ fromJSON(inputs.python-matrix) }} | ||
os: ${{ fromJSON(inputs.os-matrix) }} | ||
metadata: ${{ fromJSON(inputs.metadata-matrix) }} | ||
DB-name: ${{ fromJSON(inputs.db-matrix) }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Environment dependence | ||
uses: ./.github/actions/dependence | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
java: ${{ matrix.java }} | ||
|
||
- name: Display System Info | ||
shell: bash | ||
run: | | ||
echo "Operating System: $(uname -a 2>/dev/null || ver)" | ||
echo "Architecture: $(uname -m 2>/dev/null || echo %PROCESSOR_ARCHITECTURE%)" | ||
echo "Java Version:" | ||
java -version | ||
echo "Python Version:" | ||
python --version | ||
echo "CPU Info:" | ||
if [ "$(uname)" = "Linux" ]; then | ||
lscpu | ||
elif [ "$(uname)" = "Darwin" ]; then | ||
sysctl -n machdep.cpu.brand_string | ||
else | ||
wmic cpu get name | ||
fi | ||
echo "Memory Info:" | ||
if [ "$(uname)" = "Linux" ]; then | ||
free -h | ||
elif [ "$(uname)" = "Darwin" ]; then | ||
vm_stat | ||
else | ||
systeminfo | findstr /C:"Total Physical Memory" | ||
fi | ||
- name: Download TPC-H Data | ||
shell: bash | ||
run: | | ||
wget https://github.com/IGinX-THU/IGinX-resources/raw/main/resources/tpc.7z | ||
sudo apt-get install p7zip-full | ||
7za x tpc.7z | ||
ls tpc | ||
- name: Run ZooKeeper | ||
uses: ./.github/actions/zookeeperRunner | ||
|
||
- name: Run DB | ||
uses: ./.github/actions/dbRunner | ||
with: | ||
DB-name: ${{ matrix.DB-name }} | ||
|
||
- name: Get Old Version IGinX | ||
shell: bash | ||
run: | | ||
git clone https://github.com/IGinX-THU/IGinX.git | ||
cp -rf test/src/test/resources/tpch/queries/* IGinX/test/src/test/resources/tpch/queries/ | ||
cp -rf test/src/test/resources/tpch/sf0.1/* IGinX/test/src/test/resources/tpch/sf0.1/ | ||
cp -rf test/src/test/resources/tpch/udf/* IGinX/test/src/test/resources/tpch/udf/ | ||
cp -f test/src/test/resources/testConfig.properties IGinX/test/src/test/resources/testConfig.properties | ||
# 新增tpc-h查询测试时,旧版本代码中没有这些查询,需从新分支复制过去,添加完所有的tpc_h测试后可删除这些复制命令 | ||
|
||
- name: Rewrite DB Conf in Old IGinX | ||
uses: ./.github/actions/dbConfWriter | ||
with: | ||
DB-name: ${{ matrix.DB-name }} | ||
Root-Dir-Path: "IGinX" | ||
|
||
- name: Install Old IGinX with Maven | ||
shell: bash | ||
run: | | ||
cd IGinX | ||
mvn clean package -DskipTests -P-format -q | ||
cp -rf ${GITHUB_WORKSPACE}/test/src/test/resources/tpch/udf/* core/target/iginx-core-${VERSION}/udf_funcs/python_scripts/ | ||
- name: Change Old IGinX Config | ||
uses: ./.github/actions/confWriter | ||
with: | ||
DB-name: ${{ matrix.DB-name }} | ||
Push-Down: "true" | ||
Set-Filter-Fragment-OFF: "true" | ||
Metadata: ${{ matrix.metadata }} | ||
Root-Dir-Path: "IGinX" | ||
|
||
- name: Install New IGinX with Maven | ||
shell: bash | ||
run: mvn clean package -DskipTests -P-format -q | ||
|
||
- name: Change New IGinX Config | ||
uses: ./.github/actions/confWriter | ||
with: | ||
DB-name: ${{ matrix.DB-name }} | ||
Push-Down: "true" | ||
Set-Filter-Fragment-OFF: "true" | ||
Metadata: ${{ matrix.metadata }} | ||
|
||
- name: Insert Data into DB | ||
uses: ./.github/actions/tpchDataWriter | ||
with: | ||
DB-name: ${{ matrix.DB-name }} | ||
|
||
- name: Run 1st Regression Test | ||
id: test1 | ||
uses: ./.github/actions/tpchSingleTest | ||
|
||
- name: Run 2nd Regression Test | ||
id: test2 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test1.outputs.status }} | ||
|
||
- name: Run 3rd Regression Test | ||
id: test3 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test2.outputs.status }} | ||
|
||
- name: Run 4th Regression Test | ||
id: test4 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test3.outputs.status }} | ||
|
||
- name: Run 5th Regression Test | ||
id: test5 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test4.outputs.status }} | ||
|
||
- name: Run 6th Regression Test | ||
id: test6 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test5.outputs.status }} | ||
|
||
- name: Run 7th Regression Test | ||
id: test7 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test6.outputs.status }} | ||
|
||
- name: Run 8th Regression Test | ||
id: test8 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test7.outputs.status }} | ||
|
||
- name: Run 9th Regression Test | ||
id: test9 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test8.outputs.status }} | ||
|
||
- name: Run 10th Regression Test | ||
id: test10 | ||
uses: ./.github/actions/tpchSingleTest | ||
with: | ||
status: ${{ steps.test9.outputs.status }} |
This file contains 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
This file contains 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