Skip to content

Commit 2638ad7

Browse files
committed
Merge remote-tracking branch 'up/main' into array_func
2 parents 7b2f9c4 + 6b4cf08 commit 2638ad7

File tree

74 files changed

+7431
-6419
lines changed

Some content is hidden

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

74 files changed

+7431
-6419
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,18 @@ anyerror = { version = "=0.1.13" }
217217
anyhow = { version = "1.0.65" }
218218
apache-avro = { version = "0.17.0", features = ["snappy", "zstandard", "xz", "snappy", "bzip"] }
219219
approx = "0.5.1"
220-
arrow = { version = "55" }
221-
arrow-array = { version = "55" }
222-
arrow-buffer = { version = "55" }
223-
arrow-cast = { version = "55", features = ["prettyprint"] }
224-
arrow-csv = { version = "55" }
225-
arrow-data = { version = "55" }
226-
arrow-flight = { version = "55", features = ["flight-sql-experimental", "tls"] }
227-
arrow-ipc = { version = "55", features = ["lz4", "zstd"] }
228-
arrow-json = { version = "55" }
229-
arrow-ord = { version = "55" }
230-
arrow-schema = { version = "55", features = ["serde"] }
231-
arrow-select = { version = "55" }
220+
arrow = { version = "56" }
221+
arrow-array = { version = "56" }
222+
arrow-buffer = { version = "56" }
223+
arrow-cast = { version = "56", features = ["prettyprint"] }
224+
arrow-csv = { version = "56" }
225+
arrow-data = { version = "56" }
226+
arrow-flight = { version = "56", features = ["flight-sql-experimental", "tls-ring"] }
227+
arrow-ipc = { version = "56", features = ["lz4", "zstd"] }
228+
arrow-json = { version = "56" }
229+
arrow-ord = { version = "56" }
230+
arrow-schema = { version = "56", features = ["serde"] }
231+
arrow-select = { version = "56" }
232232
arrow-udf-runtime = { version = "0.8.0", default-features = false, features = ["javascript", "wasm"] }
233233
async-backtrace = "0.2"
234234
async-channel = "2.3.1"
@@ -330,13 +330,13 @@ hyper-util = { version = "0.1.9", features = ["client", "client-legacy", "tokio"
330330
lru = "0.12"
331331

332332
## in branch dev
333-
iceberg = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "1dace26ea25a9b9e2066367cbd3b7badc75dd7f9", features = [
333+
iceberg = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "32b1403", features = [
334334
"storage-all",
335335
] }
336-
iceberg-catalog-glue = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "1dace26ea25a9b9e2066367cbd3b7badc75dd7f9" }
337-
iceberg-catalog-hms = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "1dace26ea25a9b9e2066367cbd3b7badc75dd7f9" }
338-
iceberg-catalog-rest = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "1dace26ea25a9b9e2066367cbd3b7badc75dd7f9" }
339-
iceberg-catalog-s3tables = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "1dace26ea25a9b9e2066367cbd3b7badc75dd7f9" }
336+
iceberg-catalog-glue = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "32b1403" }
337+
iceberg-catalog-hms = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "32b1403" }
338+
iceberg-catalog-rest = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "32b1403" }
339+
iceberg-catalog-s3tables = { version = "0.4.0", git = "https://github.com/databendlabs/iceberg-rust", rev = "32b1403" }
340340

341341
# Explicitly specify compatible AWS SDK versions
342342
aws-config = "1.5.18"
@@ -415,7 +415,7 @@ ordered-float = { version = "5.1.0", default-features = false }
415415
ordq = "0.2.0"
416416
p256 = "0.13"
417417
parking_lot = "0.12.1"
418-
parquet = { version = "55", features = ["async"] }
418+
parquet = { version = "56", features = ["async"] }
419419
passwords = { version = "3.1.16" }
420420
paste = "1.0.15"
421421
percent-encoding = "2.3.1"
@@ -518,9 +518,9 @@ tokio = { version = "1.35.0", features = ["full"] }
518518
tokio-stream = { version = "0.1.11", features = ["net"] }
519519
tokio-util = { version = "0.7.13" }
520520
toml = { version = "0.8", features = ["parse"] }
521-
tonic = { version = "0.12.3", features = ["transport", "codegen", "prost", "tls-roots", "tls"] }
522-
tonic-build = { version = "0.12.3" }
523-
tonic-reflection = { version = "0.12.3" }
521+
tonic = { version = "0.13", features = ["transport", "codegen", "tls-native-roots"] }
522+
tonic-build = { version = "0.13" }
523+
tonic-reflection = { version = "0.13" }
524524
tower = { version = "0.5.1", features = ["util"] }
525525
tower-service = "0.3.3"
526526
twox-hash = "1.6.3"
@@ -643,15 +643,15 @@ overflow-checks = true
643643
rpath = true
644644

645645
[patch.crates-io]
646-
arrow-udf-runtime = { git = "https://github.com/datafuse-extras/arrow-udf.git", rev = "a442343" }
646+
arrow-udf-runtime = { git = "https://github.com/datafuse-extras/arrow-udf.git", rev = "2480dccf1" }
647647
async-backtrace = { git = "https://github.com/datafuse-extras/async-backtrace.git", rev = "dea4553" }
648648
async-recursion = { git = "https://github.com/datafuse-extras/async-recursion.git", rev = "a353334" }
649649
backtrace = { git = "https://github.com/rust-lang/backtrace-rs.git", rev = "72265be" }
650650
color-eyre = { git = "https://github.com/eyre-rs/eyre.git", rev = "e5d92c3" }
651651
deltalake = { git = "https://github.com/delta-io/delta-rs", rev = "9954bff" }
652652
map-api = { git = "https://github.com/databendlabs/map-api", tag = "v0.4.2" }
653653
openraft = { git = "https://github.com/databendlabs/openraft", tag = "v0.10.0-alpha.11" }
654-
orc-rust = { git = "https://github.com/datafuse-extras/orc-rust", rev = "d82aa6d" }
654+
orc-rust = { git = "https://github.com/datafuse-extras/orc-rust", rev = "fc812ad7010" }
655655
recursive = { git = "https://github.com/datafuse-extras/recursive.git", rev = "16e433a" }
656656
sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafuse.1" }
657657
state-machine-api = { git = "https://github.com/databendlabs/state-machine-api.git", tag = "v0.3.4" }

src/bendpy/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ publish = { workspace = true }
77
edition = { workspace = true }
88

99
[build-dependencies]
10-
pyo3-build-config = "0.24.2"
10+
pyo3-build-config = "0.25"
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313
[lib]
@@ -32,7 +32,7 @@ databend-query = { workspace = true, features = [
3232
"simd",
3333
"disable_initial_exec_tls",
3434
] }
35-
pyo3 = { version = "0.24", features = ["generate-import-lib", "abi3-py312"] }
35+
pyo3 = { version = "0.25", features = ["generate-import-lib", "abi3-py312"] }
3636
serde_json = { workspace = true }
3737
sysinfo = { workspace = true }
3838
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "sync"] }

src/common/cloud_control/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ hyper-util = { workspace = true }
1616
prost = { workspace = true }
1717
serde = { workspace = true }
1818
tonic = { workspace = true }
19+
#tonic-prost = { workspace = true }
1920

2021
[build-dependencies]
2122
lenient_semver = { workspace = true }

src/query/ast/src/ast/query.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,8 @@ impl Display for TableReference {
11041104
pub struct TableAlias {
11051105
pub name: Identifier,
11061106
pub columns: Vec<Identifier>,
1107+
/// When true, keep the original database name on bound columns even after aliasing.
1108+
pub keep_database_name: bool,
11071109
}
11081110

11091111
impl Display for TableAlias {

src/query/ast/src/parser/query.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ pub fn table_alias(i: Input) -> IResult<TableAlias> {
662662
|(name, opt_columns)| TableAlias {
663663
name,
664664
columns: opt_columns.map(|(_, cols, _)| cols).unwrap_or_default(),
665+
keep_database_name: false,
665666
},
666667
)
667668
.parse(i)
@@ -673,6 +674,7 @@ pub fn table_alias_without_as(i: Input) -> IResult<TableAlias> {
673674
|(name, opt_columns)| TableAlias {
674675
name,
675676
columns: opt_columns.map(|(_, cols, _)| cols).unwrap_or_default(),
677+
keep_database_name: false,
676678
},
677679
)
678680
.parse(i)

src/query/ast/src/parser/statement.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5336,6 +5336,7 @@ pub fn table_reference_with_alias(i: Input) -> IResult<TableReference> {
53365336
alias: alias.map(|v| TableAlias {
53375337
name: v,
53385338
columns: vec![],
5339+
keep_database_name: false,
53395340
}),
53405341
temporal: None,
53415342
with_options: None,

src/query/ast/tests/it/testdata/query.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ Query {
815815
ident_type: None,
816816
},
817817
columns: [],
818+
keep_database_name: false,
818819
},
819820
),
820821
temporal: None,
@@ -900,6 +901,7 @@ Query {
900901
ident_type: None,
901902
},
902903
columns: [],
904+
keep_database_name: false,
903905
},
904906
),
905907
temporal: Some(
@@ -1035,6 +1037,7 @@ Query {
10351037
ident_type: None,
10361038
},
10371039
columns: [],
1040+
keep_database_name: false,
10381041
},
10391042
),
10401043
temporal: Some(
@@ -1985,6 +1988,7 @@ Query {
19851988
ident_type: None,
19861989
},
19871990
],
1991+
keep_database_name: false,
19881992
},
19891993
user_specified_materialized: false,
19901994
materialized: false,
@@ -2224,6 +2228,7 @@ Query {
22242228
ident_type: None,
22252229
},
22262230
],
2231+
keep_database_name: false,
22272232
},
22282233
user_specified_materialized: true,
22292234
materialized: false,
@@ -2454,6 +2459,7 @@ Query {
24542459
ident_type: None,
24552460
},
24562461
columns: [],
2462+
keep_database_name: false,
24572463
},
24582464
user_specified_materialized: false,
24592465
materialized: false,
@@ -2693,6 +2699,7 @@ Query {
26932699
ident_type: None,
26942700
},
26952701
],
2702+
keep_database_name: false,
26962703
},
26972704
user_specified_materialized: true,
26982705
materialized: false,
@@ -2783,6 +2790,7 @@ Query {
27832790
ident_type: None,
27842791
},
27852792
columns: [],
2793+
keep_database_name: false,
27862794
},
27872795
user_specified_materialized: true,
27882796
materialized: false,
@@ -2861,6 +2869,7 @@ Query {
28612869
ident_type: None,
28622870
},
28632871
columns: [],
2872+
keep_database_name: false,
28642873
},
28652874
user_specified_materialized: false,
28662875
materialized: false,
@@ -3238,6 +3247,7 @@ Query {
32383247
ident_type: None,
32393248
},
32403249
],
3250+
keep_database_name: false,
32413251
},
32423252
user_specified_materialized: false,
32433253
materialized: false,
@@ -3513,6 +3523,7 @@ Query {
35133523
ident_type: None,
35143524
},
35153525
],
3526+
keep_database_name: false,
35163527
},
35173528
user_specified_materialized: false,
35183529
materialized: false,
@@ -3887,6 +3898,7 @@ Query {
38873898
ident_type: None,
38883899
},
38893900
columns: [],
3901+
keep_database_name: false,
38903902
},
38913903
),
38923904
temporal: None,
@@ -4167,6 +4179,7 @@ Query {
41674179
ident_type: None,
41684180
},
41694181
columns: [],
4182+
keep_database_name: false,
41704183
},
41714184
),
41724185
pivot: None,
@@ -6237,6 +6250,7 @@ Query {
62376250
ident_type: None,
62386251
},
62396252
columns: [],
6253+
keep_database_name: false,
62406254
},
62416255
),
62426256
pivot: None,
@@ -6379,6 +6393,7 @@ Query {
63796393
ident_type: None,
63806394
},
63816395
columns: [],
6396+
keep_database_name: false,
63826397
},
63836398
),
63846399
pivot: None,
@@ -6553,6 +6568,7 @@ Query {
65536568
ident_type: None,
65546569
},
65556570
columns: [],
6571+
keep_database_name: false,
65566572
},
65576573
),
65586574
pivot: None,
@@ -8812,6 +8828,7 @@ Query {
88128828
ident_type: None,
88138829
},
88148830
columns: [],
8831+
keep_database_name: false,
88158832
},
88168833
),
88178834
pivot: None,
@@ -8963,6 +8980,7 @@ Query {
89638980
ident_type: None,
89648981
},
89658982
],
8983+
keep_database_name: false,
89668984
},
89678985
),
89688986
pivot: None,
@@ -9390,6 +9408,7 @@ Query {
93909408
ident_type: None,
93919409
},
93929410
columns: [],
9411+
keep_database_name: false,
93939412
},
93949413
),
93959414
sample: None,

src/query/ast/tests/it/testdata/stmt.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11598,6 +11598,7 @@ Query(
1159811598
ident_type: None,
1159911599
},
1160011600
columns: [],
11601+
keep_database_name: false,
1160111602
},
1160211603
),
1160311604
pivot: None,
@@ -20570,6 +20571,7 @@ Query(
2057020571
ident_type: None,
2057120572
},
2057220573
columns: [],
20574+
keep_database_name: false,
2057320575
},
2057420576
),
2057520577
},
@@ -20714,6 +20716,7 @@ Query(
2071420716
ident_type: None,
2071520717
},
2071620718
columns: [],
20719+
keep_database_name: false,
2071720720
},
2071820721
),
2071920722
},
@@ -20839,6 +20842,7 @@ Query(
2083920842
ident_type: None,
2084020843
},
2084120844
columns: [],
20845+
keep_database_name: false,
2084220846
},
2084320847
),
2084420848
},
@@ -27439,6 +27443,7 @@ Query(
2743927443
ident_type: None,
2744027444
},
2744127445
columns: [],
27446+
keep_database_name: false,
2744227447
},
2744327448
user_specified_materialized: false,
2744427449
materialized: false,

src/query/functions/tests/it/scalars/cast.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ fn test_decimal_to_decimal() {
764764
let file = &mut mint.new_goldenfile("decimal_to_decimal_cast.txt").unwrap();
765765

766766
run_ast_with_context(file, "a::decimal(15,2)", TestContext {
767-
columns: &[("a", UInt64Type::from_data(vec![0_u64, 100]))],
767+
entries: &[("a", UInt64Type::from_data(vec![0_u64, 100]).into())],
768768
input_domains: Some(&[(
769769
"a",
770770
Domain::Number(NumberDomain::UInt64(UInt64Type::full_domain())),
@@ -916,12 +916,13 @@ fn test_cast_decimal_scale_reduction(file: &mut impl Write, is_try: bool, roundi
916916

917917
// Test scale reduction with column data
918918
let test_ctx = TestContext {
919-
columns: &[(
919+
entries: &[(
920920
"c",
921921
Decimal128Type::from_data_with_size(
922922
[12345i128, 67890, -11111, 99999, 0, -99999, 123456],
923923
Some(DecimalSize::new_unchecked(8, 3)),
924-
),
924+
)
925+
.into(),
925926
)],
926927
func_ctx,
927928
..TestContext::default()

0 commit comments

Comments
 (0)