Skip to content

Commit 5391e1b

Browse files
committed
Merge remote-tracking branch 'legacy/main'
Signed-off-by: Ruihang Xia <[email protected]>
2 parents 8063bef + 01e2b28 commit 5391e1b

24 files changed

+3822
-0
lines changed

.eslintrc.cjs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

.github/workflows/deploy.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ['main']
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: 'pages'
21+
cancel-in-progress: true
22+
23+
jobs:
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- uses: pnpm/action-setup@v3
34+
with:
35+
version: 8
36+
- name: Set up Node
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 20
40+
cache: 'pnpm'
41+
- name: Install dependencies
42+
run: pnpm install
43+
- name: Build
44+
run: pnpm run build
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v4
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
# Upload dist folder
51+
path: './dist'
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<div style="display: inline-flex; align-items: center; justify-content: center; margin: 0 auto;">
2+
<img src="https://webassembly.org/css/webassembly.svg" width="150">
3+
<img src="https://raw.githubusercontent.com/apache/arrow-datafusion/master/docs/source/_static/images/DataFusion-Logo-Background-White.svg" width="150">
4+
</div>
5+
6+
DataFusion Playground
7+
---------------------
8+
9+
Playground of [Apache Arrow DataFusion](https://github.com/apache/arrow-datafusion) with [WebAssembly](https://webassembly.org). In the early experimental stage as my side project.
10+
11+
🌱 Live Demo: https://waynexia.github.io/datafusion-playground/
12+
13+
## Features
14+
15+
- Cloud storage support: HTTP, AWS S3 (Google Cloud Storage and Azure Blob Storage are on the way)
16+
- Full functional DataFusion query engine.
17+
- Data formats: CSV, Parquet, JSON, Avro
18+
19+
## Screenshot
20+
21+
![Screenshot](./src/assets/datafusion-playground-demo.png)
22+
23+
## Examples
24+
25+
Create an external table from S3 parquet file:
26+
27+
```sql
28+
CREATE EXTERNAL TABLE test STORED AS PARQUET
29+
LOCATION 's3://path-to-your.parquet';
30+
```
31+
32+
Explain a query:
33+
34+
```sql
35+
EXPLAIN SELECT MIN(airport_fee), MAX(airport_fee) FROM test;
36+
```

index.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>Apache DataFusion Playground</title>
9+
</head>
10+
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
16+
</html>

package.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "datafusion-playground",
3+
"private": true,
4+
"version": "0.2.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@mantine/core": "^7.4.2",
14+
"datafusion-wasm": "^0.2.0",
15+
"jotai": "^2.6.2",
16+
"react": "^18.2.0",
17+
"react-dom": "^18.2.0"
18+
},
19+
"devDependencies": {
20+
"@iconify-json/tabler": "^1.1.104",
21+
"@types/react": "^18.2.43",
22+
"@types/react-dom": "^18.2.17",
23+
"@typescript-eslint/eslint-plugin": "^6.14.0",
24+
"@typescript-eslint/parser": "^6.14.0",
25+
"@unocss/preset-icons": "^0.58.3",
26+
"@unocss/preset-uno": "^0.58.3",
27+
"@vitejs/plugin-react": "^4.2.1",
28+
"eslint": "^8.55.0",
29+
"eslint-plugin-react-hooks": "^4.6.0",
30+
"eslint-plugin-react-refresh": "^0.4.5",
31+
"postcss": "^8.4.33",
32+
"postcss-preset-mantine": "^1.12.3",
33+
"postcss-simple-vars": "^7.0.1",
34+
"typescript": "^5.2.2",
35+
"unocss": "^0.58.3",
36+
"vite": "^5.0.8",
37+
"vite-plugin-top-level-await": "^1.4.1",
38+
"vite-plugin-wasm": "^3.3.0"
39+
}
40+
}

0 commit comments

Comments
 (0)