Skip to content

Commit f74b30b

Browse files
authored
chore(query): parse json support decimal data type (#18282)
* chore(query): parse json support decimal data type * fix * fix * fix copy into
1 parent af5a726 commit f74b30b

File tree

81 files changed

+2594
-1277
lines changed

Some content is hidden

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

81 files changed

+2594
-1277
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ deltalake = "0.18"
233233
derive-visitor = { version = "0.4.0", features = ["std-types-drive"] }
234234
derive_more = "0.99.17"
235235
enumflags2 = { version = "0.7.7", features = ["serde"] }
236-
ethnum = { version = "1.5.0" }
236+
ethnum = { version = "1.5.1" }
237237
feature-set = { version = "0.1.1" }
238238
flatbuffers = "24" # Must use the same version with arrow-ipc
239239
futures = "0.3.24"
@@ -245,8 +245,8 @@ geozero = { version = "0.13.0", features = ["default", "with-wkb", "with-geos",
245245
hashbrown = { version = "0.14.3", default-features = false }
246246
http = "1"
247247
itertools = "0.10.5"
248-
jsonb = "0.4.1"
249-
jwt-simple = "0.11.0"
248+
jsonb = "0.5.2"
249+
jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] }
250250
match-template = "0.0.1"
251251
mysql_async = { version = "0.34", default-features = false, features = ["native-tls-tls"] }
252252
object_store_opendal = "0.46"
@@ -271,7 +271,7 @@ opendal = { version = "0.49.0", features = [
271271
"services-huggingface",
272272
"services-redis",
273273
] }
274-
openraft = { git = "https://github.com/drmingdrmer/openraft", tag = "v0.10.0-alpha.6", features = [
274+
openraft = { git = "https://github.com/databendlabs/openraft", tag = "v0.10.0-alpha.7", features = [
275275
"serde",
276276
"tracing-log",
277277
"loosen-follower-log-revert", # allows removing all data from a follower and restoring from the leader.
@@ -414,7 +414,7 @@ async-recursion = { git = "https://github.com/zhang2014/async-recursion.git", re
414414
backtrace = { git = "https://github.com/rust-lang/backtrace-rs.git", rev = "72265be" }
415415
color-eyre = { git = "https://github.com/eyre-rs/eyre.git", rev = "e5d92c3" }
416416
deltalake = { git = "https://github.com/delta-io/delta-rs", rev = "57795da" }
417-
ethnum = { git = "https://github.com/ariesdevil/ethnum-rs", rev = "4cb05f1" }
417+
jsonb = { git = "https://github.com/databendlabs/jsonb.git", rev = "edd714b" }
418418
openai_api_rust = { git = "https://github.com/datafuse-extras/openai-api", rev = "819a0ed" }
419419
# patched opendal which categories the XML dersierialization errors as recoverable
420420
opendal = { git = "https://github.com/datafuse-extras/opendal-for-release-v1.2.636", tag = "v0.49.0-xml-deser-retry" }

src/common/grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ databend-common-base = { workspace = true }
1616
databend-common-exception = { workspace = true }
1717
hickory-resolver = "0.24"
1818
hyper = "0.14.20"
19-
jwt-simple = "0.11.0"
19+
jwt-simple = { workspace = true }
2020
log = { workspace = true }
2121
serde = { workspace = true }
2222
thiserror = { workspace = true }

src/common/license/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test = true
1313
[dependencies]
1414
databend-common-base = { workspace = true }
1515
databend-common-exception = { workspace = true }
16-
jwt-simple = "0.11.0"
16+
jwt-simple = { workspace = true }
1717
serde = { workspace = true }
1818
serde_json = { workspace = true }
1919

src/query/expression/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ databend-common-hashtable = { workspace = true }
3131
databend-common-io = { workspace = true }
3232
educe = "0.4"
3333
enum-as-inner = "0.5"
34-
ethnum = { workspace = true, features = ["serde", "macros", "borsh"] }
34+
ethnum = { workspace = true, features = ["serde", "macros"] }
3535
futures = { workspace = true }
3636
geo = { workspace = true }
3737
geos = { workspace = true }

src/query/expression/src/aggregate/group_hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// limitations under the License.
1414

1515
use databend_common_base::base::OrderedFloat;
16-
use ethnum::i256;
1716

1817
use crate::types::decimal::DecimalType;
1918
use crate::types::geometry::GeometryType;
19+
use crate::types::i256;
2020
use crate::types::AnyType;
2121
use crate::types::ArgType;
2222
use crate::types::BinaryType;

src/query/expression/src/aggregate/payload_flush.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
use databend_common_exception::Result;
1616
use databend_common_io::prelude::bincode_deserialize_from_slice;
17-
use ethnum::i256;
1817

1918
use super::partitioned_payload::PartitionedPayload;
2019
use super::payload::Payload;
@@ -24,6 +23,7 @@ use crate::types::binary::BinaryColumn;
2423
use crate::types::binary::BinaryColumnBuilder;
2524
use crate::types::decimal::Decimal;
2625
use crate::types::decimal::DecimalType;
26+
use crate::types::i256;
2727
use crate::types::nullable::NullableColumn;
2828
use crate::types::string::StringColumn;
2929
use crate::types::ArgType;

src/query/expression/src/aggregate/payload_row.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ use bumpalo::Bump;
1616
use databend_common_arrow::arrow::bitmap::Bitmap;
1717
use databend_common_io::prelude::bincode_deserialize_from_slice;
1818
use databend_common_io::prelude::bincode_serialize_into_buf;
19-
use ethnum::i256;
2019

2120
use crate::read;
2221
use crate::store;
2322
use crate::types::binary::BinaryColumn;
2423
use crate::types::decimal::DecimalColumn;
2524
use crate::types::decimal::DecimalType;
25+
use crate::types::i256;
2626
use crate::types::AnyType;
2727
use crate::types::ArgType;
2828
use crate::types::BinaryType;

src/query/expression/src/converts/arrow2/from.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl Column {
325325
let values = unsafe {
326326
std::mem::transmute::<
327327
Buffer<databend_common_arrow::arrow::types::i256>,
328-
Buffer<ethnum::I256>,
328+
Buffer<crate::types::i256>,
329329
>(arrow_col.values().clone())
330330
};
331331
Column::Decimal(DecimalColumn::Decimal256(values, DecimalSize {

src/query/expression/src/converts/arrow2/to.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl Column {
285285
Column::Decimal(DecimalColumn::Decimal256(col, _)) => {
286286
let values = unsafe {
287287
std::mem::transmute::<
288-
Buffer<ethnum::I256>,
288+
Buffer<crate::types::i256>,
289289
Buffer<databend_common_arrow::arrow::types::i256>,
290290
>(col.clone())
291291
};

0 commit comments

Comments
 (0)