-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into xxh/fix-es-username
- Loading branch information
Showing
110 changed files
with
2,050 additions
and
1,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement ok | ||
create table t1 (v1 int, v2 int, v3 int primary key); | ||
|
||
statement ok | ||
create table t2 (v1 int, v2 int, v3 int primary key); | ||
|
||
statement ok | ||
insert into t1 values (1, 2, 3), (2, 3, 4), (1, 2, 9); | ||
|
||
statement ok | ||
insert into t2 values (1, NULL, 8), (1, 3, 4), (1, 2, 5), (1, 2, 6); | ||
|
||
# asof inner join | ||
query IIIIII | ||
SELECT t1.v1 t1_v1, t1.v2 t1_v2, t1.v3 t1_v3, t2.v1 t2_v1, t2.v2 t2_v2, t2.v3 t2_v3 FROM t1 ASOF JOIN t2 ON t1.v1 = t2.v1 and t1.v2 < t2.v2 order by t1.v1, t1.v3; | ||
---- | ||
1 2 3 1 3 4 | ||
1 2 9 1 3 4 | ||
|
||
# asof left join | ||
query IIIIII | ||
SELECT t1.v1 t1_v1, t1.v2 t1_v2, t1.v3 t1_v3, t2.v1 t2_v1, t2.v2 t2_v2, t2.v3 t2_v3 FROM t1 ASOF LEFT JOIN t2 ON t1.v1 = t2.v1 and t1.v2 < t2.v2 order by t1.v1, t1.v3; | ||
---- | ||
1 2 3 1 3 4 | ||
1 2 9 1 3 4 | ||
2 3 4 NULL NULL NULL | ||
|
||
# asof left join | ||
query IIIIII | ||
SELECT t1.v1 t1_v1, t1.v2 t1_v2, t1.v3 t1_v3, t2.v1 t2_v1, t2.v2 t2_v2, t2.v3 t2_v3 FROM t1 ASOF LEFT JOIN t2 ON t1.v1 = t2.v1 and t1.v2 > t2.v2 order by t1.v1, t1.v3; | ||
---- | ||
1 2 3 NULL NULL NULL | ||
1 2 9 NULL NULL NULL | ||
2 3 4 NULL NULL NULL | ||
|
||
statement ok | ||
drop table t1; | ||
|
||
statement ok | ||
drop table t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# https://github.com/risingwavelabs/risingwave/issues/17121 | ||
|
||
statement ok | ||
create table t(v int); | ||
|
||
statement ok | ||
insert into t values (1); | ||
|
||
statement ok | ||
alter table t add column now1 timestamptz default now(); | ||
|
||
# Epoch (then `now()`) will advance after `FLUSH`. | ||
statement ok | ||
flush; | ||
|
||
statement ok | ||
insert into t values (2); | ||
|
||
statement ok | ||
flush; | ||
|
||
query I | ||
select v from t order by now1; | ||
---- | ||
1 | ||
2 | ||
|
||
# Add a new column again, causing the table to be replaced again. | ||
statement ok | ||
alter table t add column v2 varchar; | ||
|
||
# We show that the "snapshot value" of `now1` does not get refreshed upon the above `ALTER TABLE`. | ||
# Otherwise, the `now1` column of `v=1` would be greater than that of `v=2`. | ||
query I | ||
select v from t order by now1; | ||
---- | ||
1 | ||
2 | ||
|
||
statement ok | ||
drop table t; |
Oops, something went wrong.