Skip to content

Commit

Permalink
Merge branch 'main' into add_metasrv_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 28, 2022
2 parents d985303 + 1ff2691 commit 34d5e03
Show file tree
Hide file tree
Showing 183 changed files with 843 additions and 1,475 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Databend uses the latest techniques in vectorized query processing to allow you

## Architecture

![Databend Architecture](https://datafuse-1253727613.cos.ap-hongkong.myqcloud.com/arch/datafuse-arch-20210817.svg)
![image](https://user-images.githubusercontent.com/172204/181416449-7ecedcce-f67b-48a9-8105-d3ac3f9ac86f.png)


## Try Databend

Expand Down
1 change: 0 additions & 1 deletion common/catalog/src/table_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use common_planners::Expression;

Expand Down
8 changes: 4 additions & 4 deletions common/expression/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl FunctionRegistry {
name,
property.clone(),
|_| None,
vectorize_1_arg::<NullType, NullType>(|_| ()),
|_, _| Ok(Value::Scalar(())),
);

self.register_1_arg_core::<I1, O, _, _>(name, property.clone(), calc_domain, func);
Expand Down Expand Up @@ -328,19 +328,19 @@ impl FunctionRegistry {
name,
property.clone(),
|_, _| None,
vectorize_2_arg::<NullableType<I1>, NullType, NullType>(|_, _| ()),
|_, _, _| Ok(Value::Scalar(())),
);
self.register_2_arg_core::<NullType, NullableType<I2>, NullType, _, _>(
name,
property.clone(),
|_, _| None,
vectorize_2_arg::<NullType, NullableType<I2>, NullType>(|_, _| ()),
|_, _, _| Ok(Value::Scalar(())),
);
self.register_2_arg_core::<NullType, NullType, NullType, _, _>(
name,
property.clone(),
|_, _| None,
vectorize_2_arg::<NullType, NullType, NullType>(|_, _| ()),
|_, _, _| Ok(Value::Scalar(())),
);

self.register_2_arg_core::<I1, I2, O, _, _>(name, property.clone(), calc_domain, func);
Expand Down
127 changes: 18 additions & 109 deletions common/expression/tests/it/testdata/run-pass.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,9 @@ evaluation (internal):
ast : plus(a, b)
raw expr : plus(ColumnRef(0)::UInt8 NULL, ColumnRef(1)::NULL)
checked expr : plus<Int16 NULL, NULL>(CAST(ColumnRef(0) AS Int16 NULL), ColumnRef(1))
evaluation:
+--------+--------------------+--------+--------+
| | a | b | Output |
+--------+--------------------+--------+--------+
| Type | UInt8 NULL | NULL | NULL |
| Domain | {10..=12} ∪ {NULL} | {NULL} | {NULL} |
| Row 0 | NULL | NULL | NULL |
| Row 1 | 11 | NULL | NULL |
| Row 2 | NULL | NULL | NULL |
+--------+--------------------+--------+--------+
evaluation (internal):
+--------+------------------------------------------------------------------+
| Column | Data |
+--------+------------------------------------------------------------------+
| a | Nullable { column: UInt8([10, 11, 12]), validity: [0b_____010] } |
| b | Null { len: 3 } |
| Output | Null { len: 3 } |
+--------+------------------------------------------------------------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : minus(a, 10)
Expand Down Expand Up @@ -130,24 +115,9 @@ evaluation (internal):
ast : minus(a, b)
raw expr : minus(ColumnRef(0)::UInt8 NULL, ColumnRef(1)::NULL)
checked expr : minus<Int32 NULL, NULL>(CAST(ColumnRef(0) AS Int32 NULL), ColumnRef(1))
evaluation:
+--------+--------------------+--------+--------+
| | a | b | Output |
+--------+--------------------+--------+--------+
| Type | UInt8 NULL | NULL | NULL |
| Domain | {10..=12} ∪ {NULL} | {NULL} | {NULL} |
| Row 0 | NULL | NULL | NULL |
| Row 1 | 11 | NULL | NULL |
| Row 2 | NULL | NULL | NULL |
+--------+--------------------+--------+--------+
evaluation (internal):
+--------+------------------------------------------------------------------+
| Column | Data |
+--------+------------------------------------------------------------------+
| a | Nullable { column: UInt8([10, 11, 12]), validity: [0b_____010] } |
| b | Null { len: 3 } |
| Output | Null { len: 3 } |
+--------+------------------------------------------------------------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : multiply(a, 10)
Expand Down Expand Up @@ -221,24 +191,9 @@ evaluation (internal):
ast : multiply(a, b)
raw expr : multiply(ColumnRef(0)::UInt8 NULL, ColumnRef(1)::NULL)
checked expr : multiply<Int64 NULL, NULL>(CAST(ColumnRef(0) AS Int64 NULL), ColumnRef(1))
evaluation:
+--------+--------------------+--------+--------+
| | a | b | Output |
+--------+--------------------+--------+--------+
| Type | UInt8 NULL | NULL | NULL |
| Domain | {10..=12} ∪ {NULL} | {NULL} | {NULL} |
| Row 0 | NULL | NULL | NULL |
| Row 1 | 11 | NULL | NULL |
| Row 2 | NULL | NULL | NULL |
+--------+--------------------+--------+--------+
evaluation (internal):
+--------+------------------------------------------------------------------+
| Column | Data |
+--------+------------------------------------------------------------------+
| a | Nullable { column: UInt8([10, 11, 12]), validity: [0b_____010] } |
| b | Null { len: 3 } |
| Output | Null { len: 3 } |
+--------+------------------------------------------------------------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : divide(a, 10)
Expand Down Expand Up @@ -289,24 +244,9 @@ evaluation (internal):
ast : divide(a, b)
raw expr : divide(ColumnRef(0)::UInt8 NULL, ColumnRef(1)::NULL)
checked expr : divide<Float32 NULL, NULL>(CAST(ColumnRef(0) AS Float32 NULL), ColumnRef(1))
evaluation:
+--------+--------------------+--------+--------+
| | a | b | Output |
+--------+--------------------+--------+--------+
| Type | UInt8 NULL | NULL | NULL |
| Domain | {10..=12} ∪ {NULL} | {NULL} | {NULL} |
| Row 0 | NULL | NULL | NULL |
| Row 1 | 11 | NULL | NULL |
| Row 2 | NULL | NULL | NULL |
+--------+--------------------+--------+--------+
evaluation (internal):
+--------+------------------------------------------------------------------+
| Column | Data |
+--------+------------------------------------------------------------------+
| a | Nullable { column: UInt8([10, 11, 12]), validity: [0b_____010] } |
| b | Null { len: 3 } |
| Output | Null { len: 3 } |
+--------+------------------------------------------------------------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : avg(a, 10)
Expand Down Expand Up @@ -426,24 +366,9 @@ evaluation (internal):
ast : multiply(a, b)
raw expr : multiply(ColumnRef(0)::Int8 NULL, ColumnRef(1)::NULL)
checked expr : multiply<Int64 NULL, NULL>(CAST(ColumnRef(0) AS Int64 NULL), ColumnRef(1))
evaluation:
+--------+--------------------+--------+--------+
| | a | b | Output |
+--------+--------------------+--------+--------+
| Type | Int8 NULL | NULL | NULL |
| Domain | {10..=12} ∪ {NULL} | {NULL} | {NULL} |
| Row 0 | NULL | NULL | NULL |
| Row 1 | 11 | NULL | NULL |
| Row 2 | NULL | NULL | NULL |
+--------+--------------------+--------+--------+
evaluation (internal):
+--------+------------------------------------------------------------------+
| Column | Data |
+--------+------------------------------------------------------------------+
| a | Nullable { column: UInt8([10, 11, 12]), validity: [0b_____010] } |
| b | Null { len: 3 } |
| Output | Null { len: 3 } |
+--------+------------------------------------------------------------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : NOT a
Expand Down Expand Up @@ -471,25 +396,9 @@ evaluation (internal):
ast : NOT a
raw expr : not(ColumnRef(0)::NULL)
checked expr : not<NULL>(ColumnRef(0))
evaluation:
+--------+--------+--------+
| | a | Output |
+--------+--------+--------+
| Type | NULL | NULL |
| Domain | {NULL} | {NULL} |
| Row 0 | NULL | NULL |
| Row 1 | NULL | NULL |
| Row 2 | NULL | NULL |
| Row 3 | NULL | NULL |
| Row 4 | NULL | NULL |
+--------+--------+--------+
evaluation (internal):
+--------+-----------------+
| Column | Data |
+--------+-----------------+
| a | Null { len: 5 } |
| Output | Null { len: 5 } |
+--------+-----------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : least(10, CAST(20 as Int8), 30, 40)
Expand Down
22 changes: 3 additions & 19 deletions common/functions-v2/tests/it/scalars/testdata/boolean.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,9 @@ output : NULL
ast : NOT a
raw expr : not(ColumnRef(0)::NULL)
checked expr : not<NULL>(ColumnRef(0))
evaluation:
+--------+--------+--------+
| | a | Output |
+--------+--------+--------+
| Type | NULL | NULL |
| Domain | {NULL} | {NULL} |
| Row 0 | NULL | NULL |
| Row 1 | NULL | NULL |
| Row 2 | NULL | NULL |
| Row 3 | NULL | NULL |
| Row 4 | NULL | NULL |
+--------+--------+--------+
evaluation (internal):
+--------+-----------------+
| Column | Data |
+--------+-----------------+
| a | Null { len: 5 } |
| Output | Null { len: 5 } |
+--------+-----------------+
output type : NULL
output domain : {NULL}
output : NULL


ast : NOT a
Expand Down
1 change: 0 additions & 1 deletion common/fuse-meta/src/caches/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use common_metrics::label_counter;
use common_metrics::label_counter_with_val;
Expand Down
1 change: 0 additions & 1 deletion common/fuse-meta/src/meta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

mod common;

Expand Down
1 change: 0 additions & 1 deletion common/fuse-meta/src/meta/v0/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use std::collections::HashMap;

Expand Down
1 change: 0 additions & 1 deletion common/fuse-meta/src/meta/v1/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use std::collections::HashMap;

Expand Down
1 change: 0 additions & 1 deletion common/grpc/src/client_conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use std::time::Duration;

Expand Down
1 change: 0 additions & 1 deletion common/meta/api/src/kv_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use std::ops::Deref;

Expand Down
1 change: 0 additions & 1 deletion common/meta/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

extern crate common_meta_types;

Expand Down
1 change: 0 additions & 1 deletion common/meta/api/src/schema_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use std::sync::Arc;

Expand Down
Loading

0 comments on commit 34d5e03

Please sign in to comment.