Skip to content

Commit

Permalink
Add canAssign from CHAR and VARCHAR to PolyGeometry
Browse files Browse the repository at this point in the history
Makes the validation pass, which results in a better error message
later.
  • Loading branch information
murermader committed Dec 7, 2024
1 parent 907dfaf commit 46d7f0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/org/polypheny/db/type/PolyTypeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@ public static boolean canAssignFrom( AlgDataType toType, AlgDataType fromType )
return false;
}

if ( toType.getPolyType().getFamily() == PolyTypeFamily.GEO ) {
if ( fromType.getPolyType() == PolyType.CHAR || fromType.getPolyType() == PolyType.VARCHAR ) {
return true;
}
}

return toType.getFamily() == fromType.getFamily();
}

Expand Down

0 comments on commit 46d7f0a

Please sign in to comment.