diff --git a/interactive_engine/compiler/src/main/java/org/apache/calcite/sql/type/GraphOperandMetaDataImpl.java b/interactive_engine/compiler/src/main/java/org/apache/calcite/sql/type/GraphOperandMetaDataImpl.java index 685e62937684..dfd996990633 100644 --- a/interactive_engine/compiler/src/main/java/org/apache/calcite/sql/type/GraphOperandMetaDataImpl.java +++ b/interactive_engine/compiler/src/main/java/org/apache/calcite/sql/type/GraphOperandMetaDataImpl.java @@ -64,6 +64,10 @@ public GraphOperandMetaDataImpl( @Override protected Collection getAllowedTypeNames( RelDataTypeFactory typeFactory, SqlTypeFamily family, int iFormalOperand) { + // by default, the types in the same type family are not allowed to cast among each other, + // i.e. int32 to int64, char to varchar + // set the allowCast to true to enable the cast, see + // 'test/resources/config/modern/graph.yaml' for more usage boolean allowCast = this.allowCast.test(iFormalOperand); if (allowCast) { return family.getTypeNames();