Skip to content

Commit 45c21aa

Browse files
author
Sean Loiselle
authored
Merge pull request MaterializeInc#3386 from sploiselle/negative-tests-for-casts
Valid type cast, promotion tests
2 parents b0d293a + 9645a54 commit 45c21aa

File tree

2 files changed

+777
-7
lines changed

2 files changed

+777
-7
lines changed

src/sql/src/plan/cast.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,10 @@ lazy_static! {
143143
casts! {
144144
// BOOL
145145
(Bool, Explicit(String)) => CastBoolToStringExplicit,
146-
(Bool, Explicit(Jsonb)) => CastJsonbOrNullToJsonb,
147146
(Bool, JsonbAny) => CastJsonbOrNullToJsonb,
148147

149148
//INT32
150149
(Int32, Explicit(Bool)) => CastInt32ToBool,
151-
(Int32, Explicit(Jsonb)) => CastOp::F(|_ecx, e, _to_type| {
152-
e
153-
.call_unary(UnaryFunc::CastInt32ToFloat64)
154-
.call_unary(UnaryFunc::CastJsonbOrNullToJsonb)
155-
}),
156150
(Int32, Implicit(Int64)) => CastInt32ToInt64,
157151
(Int32, Implicit(Float32)) => CastInt32ToFloat32,
158152
(Int32, Implicit(Float64)) => CastInt32ToFloat64,
@@ -198,7 +192,6 @@ lazy_static! {
198192
e.call_binary(s, BinaryFunc::CastFloat64ToDecimal)
199193
}),
200194
(Float64, Explicit(String)) => CastFloat64ToString,
201-
(Float64, Explicit(Jsonb)) => CastJsonbOrNullToJsonb,
202195
(Float64, JsonbAny) => CastJsonbOrNullToJsonb,
203196

204197
// DECIMAL

0 commit comments

Comments
 (0)