Skip to content

Commit

Permalink
Merge branch 'dylan/temporal_join_part3' of github.com:singularity-da…
Browse files Browse the repository at this point in the history
…ta/risingwave into dylan/temporal_join_part3
  • Loading branch information
st1page committed Mar 13, 2023
2 parents 7cc05b0 + aa53c53 commit bdefe3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ impl PlanVisitor<bool> for TemporalJoinValidator {
stream_table_scan.logical().for_system_time_as_of_now()
}

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

fn visit_logical_scan(&mut self, logical_scan: &LogicalScan) -> bool {
Expand Down
3 changes: 3 additions & 0 deletions src/sqlparser/tests/testdata/select.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@
error_msg: |-
sql parser error: Expected end of statement, found: (
Near "SELECT 1::int"
- input: select id1, a1, id2, a2 from stream as S join version FOR SYSTEM_TIME AS OF NOW() AS V on id1= id2
formatted_sql: SELECT id1, a1, id2, a2 FROM stream AS S JOIN version FOR SYSTEM_TIME AS OF NOW() AS V ON id1 = id2
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 comments on commit bdefe3d

Please sign in to comment.