Skip to content

Commit 571e505

Browse files
committed
Merge branch 'main' into string-3
2 parents 139fda6 + 57fbab4 commit 571e505

File tree

344 files changed

+6722
-5217
lines changed

Some content is hidden

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

344 files changed

+6722
-5217
lines changed

.github/workflows/dev-perf.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
python3 scripts/ci/wait_tcp.py --timeout 5 --port 3307
8585
- name: Setup BendSQL
8686
run: |
87-
curl -fsSLo ./bendsql.tar.gz https://github.com/databendcloud/bendsql/releases/download/v0.2.3/bendsql-linux-amd64.tar.gz
87+
curl -fsSLo ./bendsql.tar.gz https://github.com/databendcloud/bendsql/releases/download/v0.3.0/bendsql-linux-amd64.tar.gz
8888
tar -xvzf ./bendsql.tar.gz
8989
chmod +x ./linux-amd64/bendsql
9090
sudo cp ./linux-amd64/bendsql /usr/local/bin/bendsql
@@ -97,6 +97,8 @@ jobs:
9797
run: |
9898
mkdir -p /tmp/databend-perf/
9999
bendsql benchmark \
100+
--warm 2 \
101+
--count 5 \
100102
--test-dir ./scripts/benchmark/query/benchmarks/ \
101103
--output-format json,md \
102104
--output-dir /tmp/databend-perf/ \

.github/workflows/trusted-perf.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
github.event.workflow_run.conclusion == 'success'
1616
steps:
1717
- name: Download benchmark results
18+
env:
19+
GH_TOKEN: ${{ github.token }}
1820
run: |
1921
gh run download ${{github.event.workflow_run.id }} --dir benchmark/results --name benchmark-results
2022
while read line; do
@@ -24,7 +26,7 @@ jobs:
2426
uses: everpcpc/comment-on-pr-action@v1
2527
with:
2628
number: ${{ env.PR_NUMBER }}
27-
token: ${{ secrets.GITHUB_TOKEN }}
29+
token: ${{ github.token }}
2830
identifier: benchmark
2931
body: |
3032
![platform](https://img.shields.io/static/v1?label=AWS%20EC2&message=${{ env.INSTANCE_TYPE }}&color=orange&logo=amazonec2)

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafus
9090
opendal = { version = "0.26.2" }
9191
ordered-float = { version = "3.4.0", default-features = false }
9292

93+
# type helper
94+
derive_more = "0.99.17"
95+
9396
# error
9497
anyhow = { version = "1.0.65" }
9598
anyerror = { version = "=0.1.7" }

docs/doc/11-integrations/10-data-tool/01-airbyte.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Plus, we assume that your databend destination is **S3 Compatible** since we use
2525
To check whether your backend support the integration, you could simply run the following command
2626

2727
```sql
28-
CREATE STAGE IF NOT EXISTS airbyte_stage;
28+
CREATE STAGE IF NOT EXISTS airbyte_stage FILE_FORMAT = (TYPE = CSV);
2929
PRESIGN UPLOAD @airbyte_stage/test.csv;
3030
```
3131

docs/doc/12-load-data/00-stage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DESC STAGE my_int_stage;
2626
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
2727
| name | stage_type | stage_params | copy_options | file_format_options | comment |
2828
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
29-
| my_int_stage | Internal | StageParams { storage: S3(StageS3Storage { bucket: "", path: "", credentials_aws_key_id: "", credentials_aws_secret_key: "", encryption_master_key: "" }) } | CopyOptions { on_error: None, size_limit: 0 } | FileFormatOptions { format: Csv, skip_header: 0, field_delimiter: ",", record_delimiter: "\n", compression: None } | |
29+
| my_int_stage | Internal | StageParams { storage: S3(StageS3Storage { bucket: "", path: "", credentials_aws_key_id: "", credentials_aws_secret_key: "", encryption_master_key: "" }) } | CopyOptions { on_error: None, size_limit: 0 } | FileFormatOptions { format: Parquet, skip_header: 0, field_delimiter: ",", record_delimiter: "\n", compression: None } | |
3030
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
3131
```
3232

@@ -180,7 +180,7 @@ COPY INTO books FROM @my_int_stage files=('books.csv') file_format = (type = CSV
180180
<TabItem value="parquet" label="Parquet">
181181

182182
```sql
183-
COPY INTO books FROM @my_int_stage files=('books.parquet') file_format = (type = 'Parquet');
183+
COPY INTO books FROM @my_int_stage files=('books.parquet') FILE_FORMAT = (TYPE = PARQUET);
184184
```
185185

186186
</TabItem>

docs/doc/12-load-data/01-s3.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ COPY INTO books
103103
```sql
104104
COPY INTO books
105105
FROM 's3://databend-bohu/data/'
106-
credentials=(aws_key_id='<your-access-key-id>' aws_secret_key='<your-secret-access-key>')
107-
pattern ='.*[.]parquet'
108-
file_format = (type = PARQUET);
106+
CONNECTION=(aws_key_id='<your-access-key-id>' aws_secret_key='<your-secret-access-key>')
107+
PATTERN ='.*[.]parquet'
108+
FILE_FORMAT = (TYPE = PARQUET);
109109
```
110110

111111
</TabItem>
@@ -119,10 +119,10 @@ If the file(s) is large and we want to check the file format is ok to parse, we
119119
```sql
120120
COPY INTO books
121121
FROM 's3://databend-bohu/data/'
122-
credentials=(aws_key_id='<your-access-key-id>' aws_secret_key='<your-secret-access-key>')
123-
pattern ='.*[.]csv'
124-
file_format = (type = CSV field_delimiter = ',' record_delimiter = '\n' skip_header = 0)
125-
size_limit = 1; -- only load 1 rows
122+
CONNECTION=(aws_key_id='<your-access-key-id>' aws_secret_key='<your-secret-access-key>')
123+
PATTERN ='.*[.]csv'
124+
FILE_FORMAT = (TYPE = CSV field_delimiter = ',' record_delimiter = '\n' skip_header = 0)
125+
SIZE_LIMIT = 1; -- only load 1 rows
126126
```
127127

128128
:::

docs/doc/13-sql-reference/75-file-format-options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ FILE_FORMAT = ( TYPE = { CSV | TSV | NDJSON | PARQUET | XML } [ formatTypeOption
1414
Databend currently supports XML as a source ONLY. Unloading data into an XML file is not supported yet.
1515
:::
1616

17+
If `FILE_FORMAT` is not specified, use `FILE_FORMAT = (TYPE = PARQUET)` by default.
18+
1719
`formatTypeOptions`: Includes one or more options to describe other format details about the file. The options vary depending on the file format. See the sections below to find out the available options for each supported file format.
1820

1921
```sql

docs/doc/14-sql-commands/00-ddl/40-stage/01-ddl-create-stage.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Creates a stage.
99
```sql
1010
-- Internal stage
1111
CREATE STAGE [ IF NOT EXISTS ] <internal_stage_name>
12-
[ FILE_FORMAT = ( { TYPE = { CSV | PARQUET } [ formatTypeOptions ] ) } ]
12+
[ FILE_FORMAT = ( { TYPE = { PARQUET | CSV | TSV | NDJSON } [ formatTypeOptions ] ) } ]
1313
[ COPY_OPTIONS = ( copyOptions ) ]
1414
[ COMMENT = '<string_literal>' ]
1515

1616
-- External stage
1717
CREATE STAGE [ IF NOT EXISTS ] <external_stage_name>
1818
externalStageParams
19-
[ FILE_FORMAT = ( { TYPE = { CSV | PARQUET } [ formatTypeOptions ] ) } ]
19+
[ FILE_FORMAT = ( { TYPE = { PARQUET | CSV | TSV | NDJSON } [ formatTypeOptions ] ) } ]
2020
[ COPY_OPTIONS = ( copyOptions ) ]
2121
[ COMMENT = '<string_literal>' ]
2222
```
@@ -68,18 +68,8 @@ externalStageParams ::=
6868
| ACCOUNT_KEY | Your account key for connecting the Azure Blob storage. | Optional |
6969

7070
### formatTypeOptions
71-
```
72-
formatTypeOptions ::=
73-
RECORD_DELIMITER = '<character>'
74-
FIELD_DELIMITER = '<character>'
75-
SKIP_HEADER = <integer>
76-
```
7771

78-
| Parameters | Description | Required |
79-
| ----------- | ----------- | --- |
80-
| `RECORD_DELIMITER = '<character>'` | One characters that separate records in an input file. Default `'\n'` | Optional |
81-
| `FIELD_DELIMITER = '<character>'` | One characters that separate fields in an input file. Default `','` | Optional |
82-
| `SKIP_HEADER = <integer>` | Number of lines at the start of the file to skip. Default `0` | Optional |
72+
For details about `FILE_FORMAT`, see [Input & Output File Formats](../../../13-sql-reference/75-file-format-options.md).
8373

8474
### copyOptions
8575
```

docs/doc/14-sql-commands/00-ddl/40-stage/03-ddl-desc-stage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ DESC STAGE my_int_stage;
2121
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
2222
| name | stage_type | stage_params | copy_options | file_format_options | comment |
2323
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
24-
| my_int_stage | Internal | StageParams { storage: S3(StageS3Storage { bucket: "", path: "", credentials_aws_key_id: "", credentials_aws_secret_key: "", encryption_master_key: "" }) } | CopyOptions { on_error: None, size_limit: 0 } | FileFormatOptions { format: Csv, skip_header: 0, field_delimiter: ",", record_delimiter: "\n", compression: None } | |
24+
| my_int_stage | Internal | StageParams { storage: S3(StageS3Storage { bucket: "", path: "", credentials_aws_key_id: "", credentials_aws_secret_key: "", encryption_master_key: "" }) } | CopyOptions { on_error: None, size_limit: 0 } | FileFormatOptions { format: Parquet, skip_header: 0, field_delimiter: ",", record_delimiter: "\n", compression: None } | |
2525
+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+---------+
2626
```

0 commit comments

Comments
 (0)