Skip to content

Commit 4650f7b

Browse files
authored
Merge branch 'main' into refactor/interpreter_2
2 parents 9aa35cc + 990433f commit 4650f7b

Some content is hidden

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

48 files changed

+1978
-271
lines changed

Cargo.lock

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

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

scripts/kubernetes/meta-standalone.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
- "meta-service.databend-system.svc.cluster.local"
3737
containers:
3838
- name: databend-meta
39-
image: datafuselabs/databend-meta:v0.6.100-nightly
39+
image: datafuselabs/databend-meta:latest
4040
command:
4141
- /databend-meta
4242
args:

scripts/kubernetes/query-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ spec:
164164
envFrom:
165165
- secretRef:
166166
name: query-secrets
167-
image: datafuselabs/databend-query:v0.6.100-nightly
167+
image: datafuselabs/databend-query:latest
168168
name: query
169169
ports:
170170
- name: http

src/common/jsonb/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "common-jsonb"
3+
version = "0.1.0"
4+
authors = ["Databend Authors <opensource@datafuselabs.com>"]
5+
license = "Apache-2.0"
6+
publish = false
7+
edition = "2021"
8+
9+
[dependencies]
10+
byteorder = "1.4.3"
11+
decimal-rs = "0.1.39"

src/common/jsonb/src/constants.rs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright 2022 Datafuse Labs.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// JSONB header constants
16+
pub(crate) const ARRAY_CONTAINER_TAG: u32 = 0x80000000;
17+
pub(crate) const OBJECT_CONTAINER_TAG: u32 = 0x40000000;
18+
pub(crate) const SCALAR_CONTAINER_TAG: u32 = 0x20000000;
19+
20+
pub(crate) const CONTAINER_HEADER_TYPE_MASK: u32 = 0xE0000000;
21+
pub(crate) const CONTAINER_HEADER_LEN_MASK: u32 = 0x1FFFFFFF;
22+
23+
// JSONB JEntry constants
24+
pub(crate) const NULL_TAG: u32 = 0x00000000;
25+
pub(crate) const STRING_TAG: u32 = 0x10000000;
26+
pub(crate) const NUMBER_TAG: u32 = 0x20000000;
27+
pub(crate) const FALSE_TAG: u32 = 0x30000000;
28+
pub(crate) const TRUE_TAG: u32 = 0x40000000;
29+
pub(crate) const CONTAINER_TAG: u32 = 0x50000000;
30+
31+
// @todo support offset mode
32+
#[allow(dead_code)]
33+
pub(crate) const JENTRY_IS_OFF_FLAG: u32 = 0x80000000;
34+
pub(crate) const JENTRY_TYPE_MASK: u32 = 0x70000000;
35+
pub(crate) const JENTRY_OFF_LEN_MASK: u32 = 0x0FFFFFFF;
36+
37+
// JSON text constants
38+
pub(crate) const NULL_LEN: usize = 4;
39+
pub(crate) const TRUE_LEN: usize = 4;
40+
pub(crate) const FALSE_LEN: usize = 5;
41+
pub(crate) const UNICODE_LEN: usize = 4;
42+
43+
// JSON text escape characters constants
44+
pub(crate) const BS: char = '\x5C'; // \\ Backslash
45+
pub(crate) const QU: char = '\x22'; // \" Double quotation mark
46+
pub(crate) const SD: char = '\x2F'; // \/ Slash or divide
47+
pub(crate) const BB: char = '\x08'; // \b Backspace
48+
pub(crate) const FF: char = '\x0C'; // \f Formfeed Page Break
49+
pub(crate) const NN: char = '\x0A'; // \n Newline
50+
pub(crate) const RR: char = '\x0D'; // \r Carriage Return
51+
pub(crate) const TT: char = '\x09'; // \t Horizontal Tab

0 commit comments

Comments
 (0)