Skip to content

Commit 246b06a

Browse files
authored
refactor(query): auto generate virtual columns for variant column (#17707)
* refactor(query): auto generate virtual columns for variant column * fix * support update * fix unit tests * fix explain * fix tests * support cast type * fix * fix tests * add virutal column builder tests * fix virtual block count * fix tests * fix virtual column conflict * fix * create virtual column for json array * fix * virtual column builder add sample
1 parent a33c9e7 commit 246b06a

File tree

90 files changed

+2438
-1468
lines changed

Some content is hidden

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

90 files changed

+2438
-1468
lines changed

โ€ŽCargo.lock

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

โ€ŽCargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ jaq-interpret = "1.5.0"
351351
jaq-parse = "1.0.3"
352352
jaq-std = "1.6.0"
353353
jiff = { version = "0.2.1", features = ["serde", "tzdb-bundle-always"] }
354-
jsonb = "0.5.0"
354+
jsonb = "0.5.1"
355355
jwt-simple = { version = "0.12.10", default-features = false, features = ["pure-rust"] }
356356
lenient_semver = "0.4.2"
357357
levenshtein_automata = "0.2.1"

โ€Žsrc/meta/proto-conv/tests/it/v122_virtual_schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn test_decode_v122_table_meta() -> anyhow::Result<()> {
8787
202, 1, 1, 99, 202, 1, 1, 99, 202, 1, 1, 99, 202, 1, 1, 99, 202, 1, 1, 99, 202, 1, 1, 99,
8888
202, 1, 1, 99, 202, 1, 1, 99, 202, 1, 1, 99, 226, 1, 1, 1, 234, 1, 6, 10, 1, 97, 18, 1, 98,
8989
130, 2, 55, 10, 31, 10, 7, 102, 105, 101, 108, 100, 95, 48, 18, 2, 10, 0, 18, 2, 50, 0, 18,
90-
4, 58, 2, 10, 0, 24, 19, 32, 129, 188, 193, 150, 11, 18, 6, 10, 1, 97, 18, 1, 98, 24, 130,
90+
4, 58, 2, 10, 0, 24, 19, 32, 128, 188, 193, 150, 11, 18, 6, 10, 1, 97, 18, 1, 98, 24, 129,
9191
188, 193, 150, 11, 32, 10, 160, 6, 122, 168, 6, 24, 160, 6, 122, 168, 6, 24,
9292
];
9393

@@ -185,7 +185,7 @@ fn s(ss: impl ToString) -> String {
185185
fn test_decode_v122_virtual_data_schema() -> anyhow::Result<()> {
186186
let virtual_data_schema = vec![
187187
10, 31, 10, 7, 102, 105, 101, 108, 100, 95, 48, 18, 2, 10, 0, 18, 2, 50, 0, 18, 4, 58, 2,
188-
10, 0, 24, 19, 32, 129, 188, 193, 150, 11, 18, 6, 10, 1, 97, 18, 1, 98, 24, 130, 188, 193,
188+
10, 0, 24, 19, 32, 128, 188, 193, 150, 11, 18, 6, 10, 1, 97, 18, 1, 98, 24, 129, 188, 193,
189189
150, 11, 32, 10, 160, 6, 122, 168, 6, 24,
190190
];
191191

โ€Žsrc/query/catalog/src/plan/pushdown.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ pub struct VirtualColumnField {
5353
pub source_column_id: u32,
5454
/// The source column name.
5555
pub source_name: String,
56-
/// The virtual column id, it is not a real column,
57-
/// but is used to identify a virtual column when reading data.
56+
/// The virtual column id
5857
pub column_id: u32,
5958
/// The virtual column name.
6059
pub name: String,

โ€Žsrc/query/ee/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ databend-common-catalog = { workspace = true }
1919
databend-common-config = { workspace = true }
2020
databend-common-exception = { workspace = true }
2121
databend-common-expression = { workspace = true }
22-
databend-common-functions = { workspace = true }
2322
databend-common-io = { workspace = true }
2423
databend-common-license = { workspace = true }
2524
databend-common-management = { workspace = true }
@@ -29,7 +28,6 @@ databend-common-meta-store = { workspace = true }
2928
databend-common-meta-types = { workspace = true }
3029
databend-common-metrics = { workspace = true }
3130
databend-common-pipeline-core = { workspace = true }
32-
databend-common-pipeline-sinks = { workspace = true }
3331
databend-common-pipeline-sources = { workspace = true }
3432
databend-common-pipeline-transforms = { workspace = true }
3533
databend-common-sql = { workspace = true }

โ€Žsrc/query/ee/src/hilbert_clustering/handler.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ impl HilbertClusteringHandler for RealHilbertClusteringHandler {
8585
fuse_table.schema_with_stream(),
8686
fuse_table.get_operator(),
8787
&push_downs,
88-
fuse_table.get_storage_format(),
8988
chunk.to_vec(),
9089
)
9190
.await?;

0 commit comments

Comments
ย (0)