Skip to content

Commit c770d0c

Browse files
committed
Merge branch 'main' into refactor/interpreter_2
2 parents b1b0a7e + 3c2993e commit c770d0c

File tree

113 files changed

+3326
-1617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+3326
-1617
lines changed

.github/actions/fuse_compat/action.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ inputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
- name: Setup Build Tool
16-
uses: ./.github/actions/setup_build_tool
17-
1815
- name: Download artifact
1916
uses: ./.github/actions/artifact_download
2017
with:
@@ -26,8 +23,20 @@ runs:
2623
- name: Test compatibility
2724
shell: bash
2825
run: |
29-
build-tool bash ./tests/fuse-compat/test-fuse-compat.sh 0.7.150
30-
build-tool bash ./tests/fuse-compat/test-fuse-compat.sh 0.7.151
26+
docker run --rm --tty --net=host \
27+
--user $(id -u):$(id -g) \
28+
--env BUILD_PROFILE \
29+
--volume "${PWD}:/workspace" \
30+
--workdir "/workspace" \
31+
datafuselabs/build-tool:sqllogic \
32+
bash ./tests/fuse-compat/test-fuse-compat.sh 0.7.150
33+
docker run --rm --tty --net=host \
34+
--user $(id -u):$(id -g) \
35+
--env BUILD_PROFILE \
36+
--volume "${PWD}:/workspace" \
37+
--workdir "/workspace" \
38+
datafuselabs/build-tool:sqllogic \
39+
bash ./tests/fuse-compat/test-fuse-compat.sh 0.7.151
3140
3241
- name: Upload failure
3342
if: failure()

.github/actions/test_sqllogic_standalone_linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
sha: ${{ github.sha }}
2424
target: ${{ inputs.target }}
2525

26-
- name: Run sqllogic Tests with Standalone mode with embedded meta-store
26+
- name: Run sqllogic Tests with Standalone mode
2727
shell: bash
2828
run: |
2929
docker run --rm --tty --net=host \

.github/workflows/databend-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,13 @@ jobs:
306306
id: get_image_tags
307307
shell: bash
308308
run: |
309-
dockerhub_base=${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}
310-
ecr_base=${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}
311-
_tags="${dockerhub_base}-${{ matrix.distro }},${ecr_base}-${{ matrix.distro }}"
309+
_tags="${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}-${{ matrix.distro }}"
310+
_tags="${_tags},${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}-${{ matrix.distro }}"
312311
if [[ "${{ matrix.distro }}" == "debian" ]]; then
313-
_tags="${_tags},${dockerhub_base},${ecr_base}"
312+
_tags="${_tags},${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}"
313+
_tags="${_tags},${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}"
314+
_tags="${_tags},${{ steps.login.outputs.dockerhub_repo }}:latest"
315+
_tags="${_tags},${{ steps.login.outputs.ecr_repo }}:latest"
314316
fi
315317
echo ::set-output name=IMAGE_TAGS::${_tags}
316318

.github/workflows/dev-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
- uses: ./.github/actions/test_stateless_cluster_linux
130130

131131
test_sqllogic_standalone_linux:
132-
timeout-minutes: 15
132+
timeout-minutes: 30
133133
name: test_sqllogic_${{ matrix.dirs }}_standalone_linux
134134
runs-on: [self-hosted, X64, Linux, development]
135135
needs: build_gnu

Cargo.lock

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ Databend is licensed under [Apache 2.0](LICENSE).
200200

201201
## Acknowledgement
202202

203-
- Databend is inspired by [ClickHouse](https://github.com/clickhouse/clickhouse) and [Snowflake](https://docs.snowflake.com/en/user-guide/intro-key-concepts.html#snowflake-architecture), its computing model is based on [apache-arrow](https://arrow.apache.org/).
203+
- Databend is inspired by [ClickHouse](https://github.com/clickhouse/clickhouse) and [Snowflake](https://docs.snowflake.com/en/user-guide/intro-key-concepts.html#snowflake-architecture).
204+
- Databend's computing model is based on [Arrow2](https://github.com/jorgecarleitao/arrow2), Arrow2 is a faster and safer implementation of the Apache Arrow Columnar Format.
204205
- The [documentation website](https://databend.rs) is hosted by [Vercel](https://vercel.com/?utm_source=databend&utm_campaign=oss).
205206
- Thanks to [Mergify](https://mergify.com/) for sponsoring advanced features like Batch Merge.
206207
- Thanks to [QingCloud](https://qingcloud.com) for sponsoring CI resources.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: FUSE_BLOCK
3+
---
4+
5+
Returns the block information of a snapshot of table.
6+
7+
## Syntax
8+
9+
```sql
10+
FUSE_BLOCK('<database_name>', '<table_name>'[, '<snapshot_id>'])
11+
```
12+
13+
## Examples
14+
15+
```sql
16+
CREATE TABLE mytable(c int);
17+
INSERT INTO mytable values(1);
18+
INSERT INTO mytable values(2);
19+
20+
SELECT * FROM FUSE_BLOCK('default', 'mytable');
21+
22+
---
23+
+----------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
24+
| snapshot_id | timestamp | block_location | block_size | bloom_filter_location | bloom_filter_size |
25+
+----------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
26+
| 51e84b56458f44269b05a059b364a659 | 2022-09-15 07:14:14.137268 | 1/7/_b/39a6dbbfd9b44ad5a8ec8ab264c93cf5_v0.parquet | 4 | 1/7/_i/39a6dbbfd9b44ad5a8ec8ab264c93cf5_v1.parquet | 221 |
27+
| 51e84b56458f44269b05a059b364a659 | 2022-09-15 07:14:14.137268 | 1/7/_b/d0ee9688c4d24d6da86acd8b0d6f4fad_v0.parquet | 4 | 1/7/_i/d0ee9688c4d24d6da86acd8b0d6f4fad_v1.parquet | 219 |
28+
+----------------------------------+----------------------------+----------------------------------------------------+------------+----------------------------------------------------+-------------------+
29+
```

docs/doc/30-reference/30-sql/10-dml/dml-copy-into-table.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,16 @@ COPY INTO mytable
224224
FROM 's3://mybucket/data.csv'
225225
FILE_FORMAT = (type = 'CSV' field_delimiter = ',' record_delimiter = '\n' skip_header = 1) size_limit=10;
226226
```
227+
228+
`Parquet` file example:
229+
```sql
230+
COPY INTO mytable
231+
FROM 's3://mybucket/data.parquet'
232+
CONNECTION = (
233+
ACCESS_KEY_ID = '<your-access-key-ID>'
234+
SECRET_ACCESS_KEY = '<your-secret-access-key>')
235+
FILE_FORMAT = (type = 'PARQUET');
236+
```
227237

228238
**Azure Blob storage**
229239

@@ -236,4 +246,4 @@ COPY INTO mytable
236246
ACCOUNT_NAME = '<account_name>'
237247
ACCOUNT_KEY = '<account_key>'
238248
)
239-
```
249+
```

docs/doc/60-contributing/02-roadmap.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,51 @@ This is Databend Roadmap 2022 :rocket:, sync from the [#3706](https://github.com
1212

1313
# Main tasks
1414

15-
### 1. Query
15+
Roadmap 2021: https://github.com/datafuselabs/databend/issues/746
16+
17+
# Main tasks
18+
19+
### 1. Query
1620

1721

1822
| Task | Status | Release Target | Comments |
1923
| ----------------------------------------------- | --------- | -------------- | --------------- |
20-
| [Query Cluster Track #747](https://github.com/datafuselabs/databend/issues/747) | PROGRESS | | |
21-
| [RBAC Privileges #2793](https://github.com/datafuselabs/databend/issues/2793) | PROGRESS | | |
22-
| [ New Planner Framework #1217](https://github.com/datafuselabs/databend/issues/1218)| PROGRESS | | [RFC](https://databend.rs/doc/contributing/rfcs/new-sql-planner-framework)|
23-
| [ Database Sharing #3430](https://github.com/datafuselabs/databend/issues/3430)| PROGRESS | | |
24-
| [ STAGE Command #2976](https://github.com/datafuselabs/databend/issues/2976)| PROGRESS | | |
25-
| [ COPY Command #4104](https://github.com/datafuselabs/databend/issues/4104)| PROGRESS | | |
24+
| [Query Cluster Track #747](https://github.com/datafuselabs/databend/issues/747) | DONE | | |
25+
| [RBAC Privileges #2793](https://github.com/datafuselabs/databend/issues/2793) | DONE | | |
26+
| [ New Planner Framework #1217](https://github.com/datafuselabs/databend/issues/1218)| DONE | | [RFC](https://databend.rs/doc/contributing/rfcs/new-sql-planner-framework)|
27+
| [ Database Sharing #3430](https://github.com/datafuselabs/databend/issues/3430)| DONE | | |
28+
| [ STAGE Command #2976](https://github.com/datafuselabs/databend/issues/2976)| DONE | | |
29+
| [ COPY Command #4104](https://github.com/datafuselabs/databend/issues/4104)| DONE | | |
2630
| [Index Design #3711](https://github.com/datafuselabs/databend/issues/3711) | PROGRESS | | |
27-
| [Push-Based + Pull-Based processor](https://github.com/datafuselabs/databend/issues/3379)| PROGRESS | | |
28-
| [Semi-structured Data Types #3916](https://github.com/datafuselabs/databend/issues/3916) | PROGRESS | | |
31+
| [Push-Based + Pull-Based processor](https://github.com/datafuselabs/databend/issues/3379)| DONE | | |
32+
| [Semi-structured Data Types #3916](https://github.com/datafuselabs/databend/issues/3916) | DONE | | |
33+
| [Table Cluster Key #4268](https://github.com/datafuselabs/databend/issues/4268) | DONE | | |
34+
| Transactions | DONE | | |
2935
| [Support Fulltext Index #3915](https://github.com/datafuselabs/databend/issues/3915) | PLANNING | | |
30-
| [Table Cluster Key #4268](https://github.com/datafuselabs/databend/issues/4268) | PLANNING | | |
31-
| Tansactions | PLANNING | | |
32-
| Window Functions | PLANNING | | |
33-
| Lambda Functions | PLANNING | | |
34-
| Array Functions | PLANNING | | |
36+
| [Hive External Data Source #4826](https://github.com/datafuselabs/databend/issues/4826) | DONE | | |
37+
| [Window Functions](https://github.com/datafuselabs/databend/issues/4653) | DONE | | |
38+
| Lambda Functions | DONE | | |
39+
| Array Functions | DONE | | |
3540
| Compile Aggregate Functions(JIT) | PLANNING | | |
36-
| Common Table Expressions | PLANNING | | [MySQL CTE](https://dev.mysql.com/doc/refman/8.0/en/with.html#common-table-expressions) |
37-
| External Cache | PLANNING | | |
41+
| [Common Table Expressions #6246](https://github.com/datafuselabs/databend/issues/6246) | DONE | | [MySQL CTE](https://dev.mysql.com/doc/refman/8.0/en/with.html#common-table-expressions) |
42+
| [External Cache](https://github.com/datafuselabs/databend/issues/6786) #6786 | PROGRESS | | |
3843
| External Table | PLANNING | | [Snowflake ET](https://docs.snowflake.com/en/sql-reference/sql/create-external-table.html)|
39-
| Update&Delete | PLANNING | | |
44+
| Delete | DONE | | |
45+
| Update | PROGRESS | | |
4046
| Streaming Ingestion | PLANNING | | |
41-
| Streaming Analytics | PLANNING | | |
47+
| [Resource Quota](https://github.com/datafuselabs/databend/issues/6935) | PROGRESS | | |
48+
| [LakeHouse](https://github.com/datafuselabs/databend/issues/7592) | PROGRESS | | v0.9|
4249

4350

4451
### 2. Testing
4552

4653
| Task | Status | Release Target | Comments |
4754
| ----------------------------------------------- | --------- | -------------- | --------------- |
48-
| [ Continuous Benchmarking #3084](https://github.com/datafuselabs/databend/issues/3084) | PROGRESS | | |
55+
| [ Continuous Benchmarking #3084](https://github.com/datafuselabs/databend/issues/3084) | DONE | | https://perf.databend.rs |
56+
4957

5058
# Releases
51-
- [x] #2525
52-
- [x] #2257
59+
- [x] [Release proposal: Nightly v0.8 #4591](https://github.com/datafuselabs/databend/issues/4591)
60+
- [x] [Release proposal: Nightly v0.7 #3428](https://github.com/datafuselabs/databend/issues/3428)
61+
- [x] [Release proposal: Nightly v0.6 #2525](https://github.com/datafuselabs/databend/issues/2525)
62+
- [x] [Release proposal: Nightly v0.5 #2257](https://github.com/datafuselabs/databend/issues/2257)

docs/doc/60-contributing/03-rfcs/20220809-share.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ To support creating and managing shares, Databend provides the following set of
7676
- Describe Share
7777
- Show Grants
7878
- Create Database, Table FROM Share
79+
- Select data from the Share DB tables
80+
- Show shared database tables
7981

8082
### Create Share
8183

@@ -210,6 +212,33 @@ Syntax:
210212
CREATE DATABASE <name> FROM SHARE <provider_tenant>.<share_name>
211213
```
212214

215+
216+
217+
### Select data from the Share DB tables
218+
219+
After tenants have created a database from a shared database, tenants can select data from the shared table like a normal table, before that the providers MUST have permitted access permission to the shared database and table.
220+
221+
Syntax:
222+
223+
```sql
224+
Select * from <share_db_name>.<table_name>
225+
```
226+
227+
228+
229+
### Show shared database tables
230+
231+
After tenants have created a database from a shared database, tenants can show tables from the shared database, it only outputs the tables which have been permitted to access.
232+
233+
Syntax:
234+
235+
```sql
236+
use <share_db_name>;
237+
show tables;
238+
```
239+
240+
241+
213242
## Example of Using Share with SQL
214243

215244
To create a share using SQL:

0 commit comments

Comments
 (0)