Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TCeason committed Jan 7, 2025
1 parent ae7776c commit 87bae72
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/sqllogictests/suites/crdb/and_or.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ CREATE TABLE t (k INT null, a INT null, b INT null)
statement ok
INSERT INTO t VALUES (1, NULL, NULL), (2, NULL, 1), (3, 1, NULL), (4, 2, 0), (5, 3, 3)

statement error (?s)1006.*divided by zero while evaluating function `divide(3, 0)` in expr `3 / CAST(t.b (#2) AS Float64 NULL)`.*
statement error (?s)1006.*divided by zero while evaluating function `divide\(3, 0\)` in expr `3 / CAST\(t.b \(#2\) AS Float64 NULL\)`.*
SELECT a <> 2 AND 3 / b = 1 FROM t ORDER BY k

query I
SELECT a FROM t WHERE a <> 2 AND 3 / b = 1 ORDER BY k
----
3

statement error (?s)1006.*divided by zero while evaluating function `divide\(3, 0\)` in expr `3 / t.b \(#2\)`.*
statement error (?s)1006.*divided by zero while evaluating function `divide\(3, 0\)` in expr `3 / CAST\(t.b \(#2\) AS Float64 NULL\)`.*
SELECT a = 2 OR 3 / b = 1 FROM t ORDER BY k

query I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ explain select event_name, user_id, max(user_id), avg(id) from t where user_id >
----
EvalScalar
├── output columns: [max(user_id) (#3), t.event_name (#2), t.user_id (#1), sum(id) / if(count(id) = 0, 1, count(id)) (#6)]
├── expressions: [sum(id) (#4) / CAST(if(CAST(count(id) (#5) = 0 AS Boolean NULL), 1, count(id) (#5)) AS UInt64 NULL)]
├── expressions: [CAST(sum(id) (#4) AS Float64 NULL) / CAST(if(CAST(count(id) (#5) = 0 AS Boolean NULL), 1, count(id) (#5)) AS Float64 NULL)]
├── estimated rows: 6.00
└── AggregateFinal
├── output columns: [max(user_id) (#3), sum(id) (#4), count(id) (#5), t.event_name (#2), t.user_id (#1)]
Expand Down Expand Up @@ -464,7 +464,7 @@ Sort
├── estimated rows: 6.00
└── EvalScalar
├── output columns: [max(user_id) (#3), t.event_name (#2), t.user_id (#1), sum(id) / if(count(id) = 0, 1, count(id)) (#6)]
├── expressions: [sum(id) (#4) / CAST(if(CAST(count(id) (#5) = 0 AS Boolean NULL), 1, count(id) (#5)) AS UInt64 NULL)]
├── expressions: [CAST(sum(id) (#4) AS Float64 NULL) / CAST(if(CAST(count(id) (#5) = 0 AS Boolean NULL), 1, count(id) (#5)) AS Float64 NULL)]
├── estimated rows: 6.00
└── AggregateFinal
├── output columns: [max(user_id) (#3), sum(id) (#4), count(id) (#5), t.event_name (#2), t.user_id (#1)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ EXPLAIN SELECT avg(a + 1) from t1
----
EvalScalar
├── output columns: [sum(a + 1) / if(count(a + 1) = 0, 1, count(a + 1)) (#5)]
├── expressions: [sum(a + 1) (#3) / CAST(if(CAST(count(a + 1) (#4) = 0 AS Boolean NULL), 1, count(a + 1) (#4)) AS UInt64 NULL)]
├── expressions: [CAST(sum(a + 1) (#3) AS Float64 NULL) / CAST(if(CAST(count(a + 1) (#4) = 0 AS Boolean NULL), 1, count(a + 1) (#4)) AS Float64 NULL)]
├── estimated rows: 1.00
└── AggregateFinal
├── output columns: [sum(a + 1) (#3), count(a + 1) (#4)]
Expand Down Expand Up @@ -288,7 +288,7 @@ EXPLAIN SELECT avg(a) from t1
----
EvalScalar
├── output columns: [sum(a) / if(count(a) = 0, 1, count(a)) (#4)]
├── expressions: [sum(a) (#2) / CAST(if(CAST(count(a) (#3) = 0 AS Boolean NULL), 1, count(a) (#3)) AS UInt64 NULL)]
├── expressions: [CAST(sum(a) (#2) AS Float64 NULL) / CAST(if(CAST(count(a) (#3) = 0 AS Boolean NULL), 1, count(a) (#3)) AS Float64 NULL)]
├── estimated rows: 1.00
└── AggregateFinal
├── output columns: [sum(a) (#2), count(a) (#3)]
Expand Down Expand Up @@ -715,7 +715,7 @@ EXPLAIN SELECT avg(a + 1) from t1
----
EvalScalar
├── output columns: [sum(a + 1) / if(count(a + 1) = 0, 1, count(a + 1)) (#5)]
├── expressions: [sum(a + 1) (#3) / CAST(if(CAST(count(a + 1) (#4) = 0 AS Boolean NULL), 1, count(a + 1) (#4)) AS UInt64 NULL)]
├── expressions: [CAST(sum(a + 1) (#3) AS Float64 NULL) / CAST(if(CAST(count(a + 1) (#4) = 0 AS Boolean NULL), 1, count(a + 1) (#4)) AS Float64 NULL)]
├── estimated rows: 1.00
└── AggregateFinal
├── output columns: [sum(a + 1) (#3), count(a + 1) (#4)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Sort
├── estimated rows: 0.00
└── EvalScalar
├── output columns: [sum(b) / if(count(b) = 0, 1, count(b)) (#4), sum(b) / if(count(b) = 0, 1, count(b)) (#5)]
├── expressions: [sum(b) (#2) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS UInt64 NULL), sum(b) (#2) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS UInt64 NULL)]
├── expressions: [CAST(sum(b) (#2) AS Float64 NULL) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS Float64 NULL), CAST(sum(b) (#2) AS Float64 NULL) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS Float64 NULL)]
├── estimated rows: 0.00
└── AggregateFinal
├── output columns: [sum(b) (#2), count(b) (#3), explain_agg_t1.a (#0)]
Expand Down Expand Up @@ -251,7 +251,7 @@ Sort
├── estimated rows: 0.00
└── EvalScalar
├── output columns: [sum(b) / if(count(b) = 0, 1, count(b)) + 1 (#4), sum(b) / if(count(b) = 0, 1, count(b)) (#5)]
├── expressions: [sum(b) (#2) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS UInt64 NULL) + 1, sum(b) (#2) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS UInt64 NULL)]
├── expressions: [CAST(sum(b) (#2) AS Float64 NULL) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS Float64 NULL) + 1, CAST(sum(b) (#2) AS Float64 NULL) / CAST(if(CAST(count(b) (#3) = 0 AS Boolean NULL), 1, count(b) (#3)) AS Float64 NULL)]
├── estimated rows: 0.00
└── AggregateFinal
├── output columns: [sum(b) (#2), count(b) (#3), explain_agg_t1.a (#0)]
Expand Down

0 comments on commit 87bae72

Please sign in to comment.