MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / compatible

Method compatible

src/sql/src/func.rs:1366–1373  ·  view source on GitHub ↗
(&self, ecx: &ExprContext, from: &SqlScalarType, to: &SqlScalarType)

Source from the content-addressed store, hash-verified

1364
1365impl PolymorphicCompatClass {
1366 fn compatible(&self, ecx: &ExprContext, from: &SqlScalarType, to: &SqlScalarType) -> bool {
1367 use PolymorphicCompatClass::*;
1368 match self {
1369 StructuralEq => from.structural_eq(to),
1370 Any => from.base_eq(to),
1371 _ => typeconv::can_cast(ecx, CastContext::Implicit, from, to),
1372 }
1373 }
1374}
1375
1376/// Represents a solution to a set of polymorphic constraints, expressed as the

Callers 1

determine_keyMethod · 0.80

Calls 3

can_castFunction · 0.85
structural_eqMethod · 0.80
base_eqMethod · 0.80

Tested by

no test coverage detected