Skip to content

Commit 76184f0

Browse files
committed
Merge branch 'main' into agg-v2
2 parents 058c91c + 7d35a62 commit 76184f0

File tree

277 files changed

+5839
-2740
lines changed

Some content is hidden

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

277 files changed

+5839
-2740
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: 56 additions & 4 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.

docs/doc/30-reference/10-data-types/60-data-type-nullable-types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Using `Nullable` will almost always have a negative impact on performance. If th
3333
Check whether the value is `NULL` or `NOT NULL`.
3434

3535
[IS NULL](/doc/reference/functions/conditional-functions/isnull)
36+
3637
[IS NOT NULL](/doc/reference/functions/conditional-functions/isnotnull)
3738

3839
### Example
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/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)