Skip to content

Commit 867dace

Browse files
committed
wierd tests
Signed-off-by: Ruihang Xia <[email protected]>
1 parent dad0f6c commit 867dace

File tree

4 files changed

+20
-38
lines changed

4 files changed

+20
-38
lines changed

tests/cases/standalone/common/cte/cte.result

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ with cte1 as (Select i as j from a) select * from cte1 cte11, cte1 cte12;
7474

7575
with cte1 as (Select i as j from a) select * from cte1 where j = (select max(j) from cte1 as cte2);
7676

77-
+----+
78-
| j |
79-
+----+
80-
| 42 |
81-
+----+
77+
++
78+
++
8279

8380
with cte1(x, y) as (select 42 a, 84 b) select zzz, y from cte1 t1(zzz, y);
8481

tests/cases/standalone/common/cte/cte_in_cte.result

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ with cte1 as (Select i as j from a) select * from (with cte2 as (select max(j) a
5454
-- this feature is not implemented in datafusion
5555
with cte1 as (Select i as j from a) select * from cte1 where j = (with cte2 as (select max(j) as j from cte1) select j from cte2);
5656

57-
+----+
58-
| j |
59-
+----+
60-
| 42 |
61-
+----+
57+
++
58+
++
6259

6360
-- Refer to same-named CTE in a subquery expression
6461
-- this feature is not implemented in datafusion

tests/cases/standalone/common/promql/scalar.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ TQL EVAL (0, 15, '5s') scalar(host{host="host1"} + scalar(host{host="host2"}));
142142
+---------------------+-----------------------------------+
143143
| ts | scalar(lhs.val + rhs.scalar(val)) |
144144
+---------------------+-----------------------------------+
145-
| 1970-01-01T00:00:00 | 3.0 |
146-
| 1970-01-01T00:00:05 | 7.0 |
147-
| 1970-01-01T00:00:10 | 11.0 |
148-
| 1970-01-01T00:00:15 | 15.0 |
145+
| 1970-01-01T00:00:00 | NaN |
146+
| 1970-01-01T00:00:05 | NaN |
147+
| 1970-01-01T00:00:10 | NaN |
148+
| 1970-01-01T00:00:15 | NaN |
149149
+---------------------+-----------------------------------+
150150

151151
-- SQLNESS SORT_RESULT 3 1
@@ -154,10 +154,10 @@ TQL EVAL (0, 15, '5s') scalar(scalar(host{host="host2"}) + host{host="host1"});
154154
+---------------------+-----------------------------------+
155155
| ts | scalar(lhs.scalar(val) + rhs.val) |
156156
+---------------------+-----------------------------------+
157-
| 1970-01-01T00:00:00 | 3.0 |
158-
| 1970-01-01T00:00:05 | 7.0 |
159-
| 1970-01-01T00:00:10 | 11.0 |
160-
| 1970-01-01T00:00:15 | 15.0 |
157+
| 1970-01-01T00:00:00 | NaN |
158+
| 1970-01-01T00:00:05 | NaN |
159+
| 1970-01-01T00:00:10 | NaN |
160+
| 1970-01-01T00:00:15 | NaN |
161161
+---------------------+-----------------------------------+
162162

163163
-- SQLNESS SORT_RESULT 3 1

tests/cases/standalone/common/types/float/nan_join.result

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,13 @@ Affected Rows: 3
1111

1212
SELECT * FROM floats JOIN (SELECT 'inf'::FLOAT) tbl(f) USING (f);
1313

14-
+-----+-------------------------+
15-
| f | ts |
16-
+-----+-------------------------+
17-
| inf | 1970-01-01T00:00:00.001 |
18-
+-----+-------------------------+
14+
++
15+
++
1916

2017
SELECT * FROM floats JOIN (SELECT '-inf'::FLOAT) tbl(f) USING (f);
2118

22-
+------+-------------------------+
23-
| f | ts |
24-
+------+-------------------------+
25-
| -inf | 1970-01-01T00:00:00.002 |
26-
+------+-------------------------+
19+
++
20+
++
2721

2822
SELECT * FROM floats JOIN (SELECT 'inf'::FLOAT) tbl(f) ON (floats.f >= tbl.f) ORDER BY 1;
2923

@@ -67,19 +61,13 @@ Affected Rows: 3
6761

6862
SELECT * FROM doubles JOIN (SELECT 'inf'::DOUBLE) tbl(d) USING (d);
6963

70-
+-----+-------------------------+
71-
| d | ts |
72-
+-----+-------------------------+
73-
| inf | 1970-01-01T00:00:00.001 |
74-
+-----+-------------------------+
64+
++
65+
++
7566

7667
SELECT * FROM doubles JOIN (SELECT '-inf'::DOUBLE) tbl(d) USING (d);
7768

78-
+------+-------------------------+
79-
| d | ts |
80-
+------+-------------------------+
81-
| -inf | 1970-01-01T00:00:00.002 |
82-
+------+-------------------------+
69+
++
70+
++
8371

8472
SELECT * FROM doubles JOIN (SELECT 'inf'::DOUBLE) tbl(d) ON (doubles.d >= tbl.d) ORDER BY 1;
8573

0 commit comments

Comments
 (0)