Skip to content

Commit bdefe3d

Browse files
committed
Merge branch 'dylan/temporal_join_part3' of github.com:singularity-data/risingwave into dylan/temporal_join_part3
2 parents 7cc05b0 + aa53c53 commit bdefe3d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/frontend/src/optimizer/plan_visitor/temporal_join_validator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ impl PlanVisitor<bool> for TemporalJoinValidator {
3737
stream_table_scan.logical().for_system_time_as_of_now()
3838
}
3939

40-
fn visit_batch_seq_scan(&mut self, bathc_seq_scan: &BatchSeqScan) -> bool {
41-
bathc_seq_scan.logical().for_system_time_as_of_now()
40+
fn visit_batch_seq_scan(&mut self, batch_seq_scan: &BatchSeqScan) -> bool {
41+
batch_seq_scan.logical().for_system_time_as_of_now()
4242
}
4343

4444
fn visit_logical_scan(&mut self, logical_scan: &LogicalScan) -> bool {

src/sqlparser/tests/testdata/select.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@
7676
error_msg: |-
7777
sql parser error: Expected end of statement, found: (
7878
Near "SELECT 1::int"
79+
- input: select id1, a1, id2, a2 from stream as S join version FOR SYSTEM_TIME AS OF NOW() AS V on id1= id2
80+
formatted_sql: SELECT id1, a1, id2, a2 FROM stream AS S JOIN version FOR SYSTEM_TIME AS OF NOW() AS V ON id1 = id2
81+
formatted_ast: 'Query(Query { with: None, body: Select(Select { distinct: All, projection: [UnnamedExpr(Identifier(Ident { value: "id1", quote_style: None })), UnnamedExpr(Identifier(Ident { value: "a1", quote_style: None })), UnnamedExpr(Identifier(Ident { value: "id2", quote_style: None })), UnnamedExpr(Identifier(Ident { value: "a2", quote_style: None }))], from: [TableWithJoins { relation: Table { name: ObjectName([Ident { value: "stream", quote_style: None }]), alias: Some(TableAlias { name: Ident { value: "S", quote_style: None }, columns: [] }), for_system_time_as_of_now: false }, joins: [Join { relation: Table { name: ObjectName([Ident { value: "version", quote_style: None }]), alias: Some(TableAlias { name: Ident { value: "V", quote_style: None }, columns: [] }), for_system_time_as_of_now: true }, join_operator: Inner(On(BinaryOp { left: Identifier(Ident { value: "id1", quote_style: None }), op: Eq, right: Identifier(Ident { value: "id2", quote_style: None }) })) }] }], lateral_views: [], selection: None, group_by: [], having: None }), order_by: [], limit: None, offset: None, fetch: None })'

0 commit comments

Comments
 (0)