Skip to content

Commit

Permalink
Merge branch 'main' into fix-agg-index
Browse files Browse the repository at this point in the history
  • Loading branch information
RinChanNOWWW authored Oct 10, 2023
2 parents 7640e4c + c135e78 commit 13db9bc
Show file tree
Hide file tree
Showing 180 changed files with 3,251 additions and 1,785 deletions.
8 changes: 8 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[test-groups]
serial-integration = { max-threads = 1 }


[[profile.default.overrides]]
filter = 'package(databend-meta)'
test-group = 'serial-integration'

3 changes: 2 additions & 1 deletion .github/actions/test_unit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ runs:
bypass_env_vars: RUSTFLAGS,RUSTDOCFLAGS,RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE

- shell: bash
run: cargo -Zgitoxide=fetch,shallow-index,shallow-deps test
run: |
cargo -Zgitoxide=fetch,shallow-index,shallow-deps nextest run --no-fail-fast --hide-progress-bar
env:
RUST_TEST_THREADS: "8"
RUST_LOG: ERROR
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ jobs:
tar x -C ./target/release -f ./distro/databend-testsuite-${version}-${target}.tar.gz --strip-components 1 bin/
chmod +x ./target/release/databend-*
- name: Run sqlsmith
timeout-minutes: 30
timeout-minutes: 60
shell: bash
run: |
bash ./scripts/ci/ci-run-sqlsmith-tests.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.linux.hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/build_linux
timeout-minutes: 30
timeout-minutes: 60
with:
sha: ${{ github.sha }}
target: ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/check
timeout-minutes: 30
timeout-minutes: 60
with:
github_token: ${{ github.token }}

Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/test_unit
timeout-minutes: 30
timeout-minutes: 60

test_metactl:
runs-on: [self-hosted, X64, Linux, 4c8g, "${{ inputs.runner_provider }}"]
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmark/clickbench/merge_into/create_local.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ CREATE TRANSIENT TABLE IF NOT EXISTS target_table (
l_shipinstruct STRING not null,
l_shipmode STRING not null,
l_comment STRING not null
);
) CLUSTER BY(l_shipdate, l_orderkey);
2 changes: 1 addition & 1 deletion benchmark/clickbench/merge_into/load.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ANALYZE TABLE source_table;

-- load data to target_table, it's almost 6000000 rows in source
COPY INTO target_table
FROM 'fs:///tmp/data/lineitem2.tbl' PATTERN = 'lineitem.tbl.*' FILE_FORMAT =(
FROM 'fs:///tmp/data/lineitem2.tbl' PATTERN = 'lineitem.tbl2.*' FILE_FORMAT =(
type = 'CSV' field_delimiter = '|' record_delimiter = '\n' skip_header = 0
);

Expand Down
7 changes: 4 additions & 3 deletions docs/doc/03-develop/04-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
databend-driver = "0.2.19"
databend-driver = "0.7"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1.12"
```
Expand All @@ -55,13 +55,14 @@ The value of `hostname` in the code below must align with your HTTP handler sett
:::

```rust title='main.rs'
use databend_driver::new_connection;
use databend_driver::Client;
use tokio_stream::StreamExt;

#[tokio::main]
async fn main() {
let dsn = "databend://user1:abc123@localhost:8000/default?sslmode=disable";
let conn = new_connection(dsn).unwrap();
let client = Client::new(dsn.to_string());
let conn = client.get_conn().await.unwrap();

let sql_db_create = "CREATE DATABASE IF NOT EXISTS book_db;";
conn.exec(sql_db_create).await.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/12-load-data/00-transform/05-querying-stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Querying Staged Files
---
import FunctionDescription from '@site/src/components/FunctionDescription';

<FunctionDescription description="Introduced: v1.1.65"/>
<FunctionDescription description="Introduced or updated: v1.2.148"/>

Databend allows you to directly query data in the files stored in one of the following locations without loading them into a table:

Expand Down
14 changes: 6 additions & 8 deletions docs/doc/13-sql-reference/51-connect-parameters.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
title: Connection Parameters
---
import FunctionDescription from '@site/src/components/FunctionDescription';

The connection parameters refer to a set of essential connection details required for establishing a secure link to supported external storage services, like Amazon S3. These parameters are enclosed within parentheses and consists of key-value pairs separated by commas or spaces. It is commonly utilized in operations such as creating a stage, copying data into Databend, and querying staged files from external sources. The provided key-value pairs offer the necessary authentication and configuration information for the connection.
<FunctionDescription description="Introduced or updated: v1.2.148"/>

For example, the following statement creates an external stage on Amazon S3 with the connection parameters:
The connection parameters refer to a set of essential connection details required for establishing a secure link to supported external storage services, like Amazon S3. These parameters are enclosed within parentheses and consists of key-value pairs separated by commas. It is commonly utilized in operations such as creating a stage, copying data into Databend, and querying staged files from external sources. The provided key-value pairs offer the necessary authentication and configuration information for the connection.

For example, the following statement creates an external stage on MinIO with the connection parameters:

```sql
CREATE STAGE my_s3_stage
URL = 's3://load/files/'
CONNECTION = (
ACCESS_KEY_ID = '<your-access-key-id>',
SECRET_ACCESS_KEY = '<your-secret-access-key>'
);
CREATE STAGE my_minio_stage URL = 's3://databend' CONNECTION = (ENDPOINT_URL = 'http://localhost:9000', ACCESS_KEY_ID = 'ROOTUSER', SECRET_ACCESS_KEY = 'CHANGEME123', region = 'us-west-2');
```

The connection parameters vary for different storage services based on their specific requirements and authentication mechanisms. For more information, please refer to the tables below.
Expand Down
30 changes: 15 additions & 15 deletions docs/doc/14-sql-commands/00-ddl/30-user/01-user-create-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ For more information about MySQL authentication plugins, see [A Tale of Two Pass
CREATE USER user1 IDENTIFIED BY 'abc123';

SHOW USERS;
+-----------+----------+----------------------+------------------------------------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-----------+----------+----------------------+------------------------------------------+---------------+
| user1 | % | double_sha1_password | 6691484ea6b50ddde1926a220da01fa9e575c18a | NO |
+-----------+----------+----------------------+------------------------------------------+---------------+
+-----------+----------+----------------------+---------------+
| name | hostname | auth_type | is_configured |
+-----------+----------+----------------------+---------------+
| user1 | % | double_sha1_password | NO |
+-----------+----------+----------------------+---------------+
```

### Creating User with sha256_password auth_type
Expand All @@ -54,11 +54,11 @@ SHOW USERS;
CREATE USER user1 IDENTIFIED WITH sha256_password BY 'abc123';

SHOW USERS;
+-----------+----------+----------------------+------------------------------------------------------------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-----------+----------+----------------------+------------------------------------------------------------------+---------------+
| user1 | % | sha256_password | 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 | NO |
+-----------+----------+----------------------+------------------------------------------------------------------+---------------+
+-----------+----------+----------------------+---------------+
| name | hostname | auth_type | is_configured |
+-----------+----------+----------------------+---------------+
| user1 | % | sha256_password | NO |
+-----------+----------+----------------------+---------------+
```

### Creating User with Network Policy
Expand All @@ -67,9 +67,9 @@ SHOW USERS;
CREATE USER user1 IDENTIFIED BY 'abc123' WITH SET NETWORK POLICY='test_policy';

SHOW USERS;
+-----------+----------+----------------------+------------------------------------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-----------+----------+----------------------+------------------------------------------+---------------+
| user1 | % | double_sha1_password | 6691484ea6b50ddde1926a220da01fa9e575c18a | NO |
+-----------+----------+----------------------+------------------------------------------+---------------+
+-----------+----------+----------------------+---------------+
| name | hostname | auth_type | is_configured |
+-----------+----------+----------------------+---------------+
| user1 | % | double_sha1_password | NO |
+-----------+----------+----------------------+---------------+
```
8 changes: 4 additions & 4 deletions docs/doc/14-sql-commands/00-ddl/30-user/02-user-show-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SHOW USERS;
SHOW USERS;

---
| name | hostname | auth_type | auth_string | is_configured |
|---------------------------|----------|----------------------|------------------------------------------|---------------|
| sqluser_johnappleseed | % | double_sha1_password | 147dee8f648a745805ee8dda80bb8e277559f55b | NO |
| johnappleseed@example.com | % | jwt | | NO |
| name | hostname | auth_type | is_configured |
|---------------------------|----------|----------------------|---------------|
| sqluser_johnappleseed | % | double_sha1_password | NO |
| johnappleseed@example.com | % | jwt | NO |
```
30 changes: 15 additions & 15 deletions docs/doc/14-sql-commands/00-ddl/30-user/03-user-alter-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ ALTER USER <name> WITH UNSET NETWORK POLICY
CREATE USER user1 IDENTIFIED BY 'abc123';

SHOW USERS;
+-----------+----------+----------------------+------------------------------------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-----------+----------+----------------------+------------------------------------------+---------------+
| user1 | % | double_sha1_password | 6691484ea6b50ddde1926a220da01fa9e575c18a | NO |
+-----------+----------+----------------------+------------------------------------------+---------------+
+-----------+----------+----------------------+---------------+
| name | hostname | auth_type | is_configured |
+-----------+----------+----------------------+---------------+
| user1 | % | double_sha1_password | NO |
+-----------+----------+----------------------+---------------+

ALTER USER user1 IDENTIFIED WITH sha256_password BY '123abc';

SHOW USERS;
+-------+----------+-----------------+------------------------------------------------------------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-------+----------+-----------------+------------------------------------------------------------------+---------------+
| user1 | % | sha256_password | dd130a849d7b29e5541b05d2f7f86a4acd4f1ec598c1c9438783f56bc4f0ff80 | NO |
+-------+----------+-----------------+------------------------------------------------------------------+---------------+
+-------+----------+-----------------+---------------+
| name | hostname | auth_type | is_configured |
+-------+----------+-----------------+---------------+
| user1 | % | sha256_password | NO |
+-------+----------+-----------------+---------------+

ALTER USER 'user1' IDENTIFIED WITH no_password;

show users;
+-------+----------+-------------+-------------+---------------+
| name | hostname | auth_type | auth_string | is_configured |
+-------+----------+-------------+-------------+---------------+
| user1 | % | no_password | | NO |
+-------+----------+-------------+-------------+---------------+
+-------+----------+-------------+---------------+
| name | hostname | auth_type | is_configured |
+-------+----------+-------------+---------------+
| user1 | % | no_password | NO |
+-------+----------+-------------+---------------+
```

### Setting & Unsetting Network Policy
Expand Down
Loading

0 comments on commit 13db9bc

Please sign in to comment.