Skip to content

Commit

Permalink
build: fork connector-x
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Jan 29, 2024
0 parents commit c8d8ebe
Show file tree
Hide file tree
Showing 242 changed files with 41,031 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Bug report
about: An issue with rust connectorx or python connectorx
title: ''
labels: 'bug'
assignees: ''
---

#### What language are you using?

Replace this text with the **Rust** or **Python**.

#### What version are you using?

Replace this text with the version.

#### What database are you using?

e.g. PostgreSQL, MySQL

#### What dataframe are you using?

e.g. Pandas, Arrow

#### Can you describe your bug?

Give a high level description of the bug.

#### What are the steps to reproduce the behavior?

If possible, please include a **minimal simple** example including:

##### Database setup if the error only happens on specific data or data type

Table schema and example data

##### Example query / code

```
your
code
goes
here
```

#### What is the error?

Show the error result here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Feature request
about: Suggest a new feature for connectorx
title: ''
labels: 'feature'
assignees: ''
---


#### Describe your feature request

Please describe the behavior you want and the motivation.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Question
about: Ask a question about connectorx
title: ''
labels: ''
assignees: ''
---

#### Try Discussion?

You can ask questions in [discussions](https://github.com/sfu-db/connector-x/discussions/categories/q-a).

#### Other

Feel free to ask here if you think it's more suitable.
15 changes: 15 additions & 0 deletions .github/config/db1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"driver": "org.postgresql.Driver",
"url": "jdbc:postgresql://postgres:5432/postgres",
"username": "postgres",
"password": "postgres",
"costParams": {
"join": 10.0,
"agg": 20.0,
"sort": 20.0,
"trans": 3.0
},
"dialect": "postgres",
"cardEstType": "postgres",
"partitionType": "postgres"
}
15 changes: 15 additions & 0 deletions .github/config/db2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"driver": "org.postgresql.Driver",
"url": "jdbc:postgresql://postgres:5432/postgres",
"username": "postgres",
"password": "postgres",
"costParams": {
"join": 10.0,
"agg": 20.0,
"sort": 20.0,
"trans": 3.0
},
"dialect": "postgres",
"cardEstType": "postgres",
"partitionType": "postgres"
}
77 changes: 77 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: benchmark

on:
workflow_dispatch:
push:
branches:
- prerelease
- main
pull_request:
branches:
- main

jobs:
benchmark:
runs-on: [self-hosted, linux, x64, connectorx-benchmark]
steps:
- uses: actions/checkout@v2

- name: Install tools
run: |
apt-get update
apt-get install -y curl postgresql-client build-essential python3-dev python3-pip pkg-config libssl-dev git sqlite3 libsqlite3-dev mysql-client libmysqlclient-dev libkrb5-dev libclang-dev
env:
DEBIAN_FRONTEND: noninteractive

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
default: true

- name: Install other dependent tools
run: |
pip3 install poetry
if [ ! -f "$HOME/.cargo/bin/just" ]; then curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/.cargo/bin; fi
- name: Install python dependencies
run: just bootstrap-python

- name: Run benchmarks
run: just benchmark-report
env:
POSTGRES_URL: ${{ secrets.POSTGRES_URL }}
MYSQL_URL: ${{ secrets.MYSQL_URL }}
TPCH_TABLE: lineitem

- name: Ignore git safe directory error
run: git config --global --add safe.directory /tmp/github-runner-connectorx/connector-x/connector-x

- name: Show benchmark result for pull request
if: ${{ github.event_name == 'pull_request'}}
uses: rhysd/github-action-benchmark@v1
with:
name: "ConnectorX TPC-H Scale@1 Benchmarks"
tool: "pytest"
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
save-data-file: false
fail-threshold: "200%"
comment-always: true
fail-on-alert: true

- name: Store benchmark result for push operator
if: ${{ github.event_name == 'push'}}
uses: rhysd/github-action-benchmark@v1
with:
name: "ConnectorX TPC-H Scale@1 Benchmarks"
tool: "pytest"
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: "100%"
fail-threshold: "200%"
comment-always: true
fail-on-alert: true
Loading

0 comments on commit c8d8ebe

Please sign in to comment.