Skip to content

Commit 1434269

Browse files
first pass
1 parent 5b34ab4 commit 1434269

File tree

26 files changed

+623
-30
lines changed

26 files changed

+623
-30
lines changed

apps/framework-cli/src/cli/local_webserver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3545,6 +3545,7 @@ mod tests {
35453545
comment: None,
35463546
ttl: None,
35473547
codec: None,
3548+
materialized: None,
35483549
}],
35493550
order_by: OrderBy::Fields(vec!["id".to_string()]),
35503551
partition_by: None,

apps/framework-cli/src/cli/routines/migrate.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ mod tests {
764764
comment: None,
765765
ttl: None,
766766
codec: None,
767+
materialized: None,
767768
}],
768769
order_by: OrderBy::Fields(vec!["id".to_string()]),
769770
partition_by: None,
@@ -799,6 +800,7 @@ mod tests {
799800
comment: None,
800801
ttl: None,
801802
codec: None,
803+
materialized: None,
802804
});
803805
table
804806
}
@@ -1143,6 +1145,7 @@ mod tests {
11431145
comment: None,
11441146
ttl: None,
11451147
codec: None,
1148+
materialized: None,
11461149
},
11471150
after_column: None,
11481151
database: Some("bad_db".to_string()),
@@ -1161,6 +1164,7 @@ mod tests {
11611164
comment: None,
11621165
ttl: None,
11631166
codec: None,
1167+
materialized: None,
11641168
},
11651169
after_column: Column {
11661170
name: "col".to_string(),
@@ -1173,6 +1177,7 @@ mod tests {
11731177
comment: None,
11741178
ttl: None,
11751179
codec: None,
1180+
materialized: None,
11761181
},
11771182
database: Some("another_bad_db".to_string()),
11781183
cluster_name: None,

apps/framework-cli/src/framework/core/infra_reality_checker.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ mod tests {
516516
comment: None,
517517
ttl: None,
518518
codec: None,
519+
materialized: None,
519520
}],
520521
order_by: OrderBy::Fields(vec!["id".to_string()]),
521522
partition_by: None,
@@ -612,6 +613,7 @@ mod tests {
612613
comment: None,
613614
ttl: None,
614615
codec: None,
616+
materialized: None,
615617
});
616618

617619
let mock_client = MockOlapClient {
@@ -682,6 +684,7 @@ mod tests {
682684
comment: None,
683685
ttl: None,
684686
codec: None,
687+
materialized: None,
685688
};
686689
actual_table.columns.push(timestamp_col.clone());
687690
infra_table.columns.push(timestamp_col);

apps/framework-cli/src/framework/core/infrastructure/table.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,8 @@ pub struct Column {
602602
pub ttl: Option<String>,
603603
#[serde(skip_serializing_if = "Option::is_none", default)]
604604
pub codec: Option<String>, // Compression codec expression (e.g., "ZSTD(3)", "Delta, LZ4")
605+
#[serde(skip_serializing_if = "Option::is_none", default)]
606+
pub materialized: Option<String>, // MATERIALIZED column expression (computed at write-time, physically stored)
605607
}
606608

607609
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
@@ -1117,6 +1119,7 @@ impl Column {
11171119
comment: self.comment.clone(),
11181120
ttl: self.ttl.clone(),
11191121
codec: self.codec.clone(),
1122+
materialized: self.materialized.clone(),
11201123
special_fields: Default::default(),
11211124
}
11221125
}
@@ -1140,6 +1143,7 @@ impl Column {
11401143
comment: proto.comment,
11411144
ttl: proto.ttl,
11421145
codec: proto.codec,
1146+
materialized: proto.materialized,
11431147
}
11441148
}
11451149
}
@@ -1520,6 +1524,7 @@ mod tests {
15201524
comment: None,
15211525
ttl: None,
15221526
codec: None,
1527+
materialized: None,
15231528
};
15241529

15251530
let json = serde_json::to_string(&nested_column).unwrap();
@@ -1541,6 +1546,7 @@ mod tests {
15411546
comment: Some("[MOOSE_METADATA:DO_NOT_MODIFY] {\"version\":1,\"enum\":{\"name\":\"TestEnum\",\"members\":[]}}".to_string()),
15421547
ttl: None,
15431548
codec: None,
1549+
materialized: None,
15441550
};
15451551

15461552
// Convert to proto and back
@@ -1565,6 +1571,7 @@ mod tests {
15651571
comment: None,
15661572
ttl: None,
15671573
codec: None,
1574+
materialized: None,
15681575
};
15691576

15701577
let proto = column_without_comment.to_proto();
@@ -1749,6 +1756,7 @@ mod tests {
17491756
comment: None,
17501757
ttl: None,
17511758
codec: None,
1759+
materialized: None,
17521760
},
17531761
Column {
17541762
name: "name".to_string(),
@@ -1761,6 +1769,7 @@ mod tests {
17611769
comment: None,
17621770
ttl: None,
17631771
codec: None,
1772+
materialized: None,
17641773
},
17651774
];
17661775

0 commit comments

Comments
 (0)