This reverts commit f668b3965effbd5df4902f20b496cb6b6642414c.
This commit is contained in:
@ -147,7 +147,7 @@ public class CastExpr extends Expr {
|
||||
Type to = getActualType(type);
|
||||
NullableMode nullableMode = TYPE_NULLABLE_MODE.get(Pair.of(from, to));
|
||||
Preconditions.checkState(nullableMode != null,
|
||||
"cannot find nullable mode for cast from " + from + " to " + to);
|
||||
"cannot find nullable node for cast from " + from + " to " + to);
|
||||
fn = new Function(new FunctionName(getFnName(type)), Lists.newArrayList(e.type), type,
|
||||
false, true, nullableMode);
|
||||
} else {
|
||||
|
||||
@ -22,7 +22,6 @@ import org.apache.doris.nereids.rules.expression.AbstractExpressionRewriteRule;
|
||||
import org.apache.doris.nereids.rules.expression.ExpressionRewriteContext;
|
||||
import org.apache.doris.nereids.trees.expressions.Cast;
|
||||
import org.apache.doris.nereids.trees.expressions.Expression;
|
||||
import org.apache.doris.nereids.types.AggStateType;
|
||||
import org.apache.doris.nereids.types.ArrayType;
|
||||
import org.apache.doris.nereids.types.DataType;
|
||||
|
||||
@ -47,8 +46,6 @@ public class CheckCast extends AbstractExpressionRewriteRule {
|
||||
private boolean check(DataType originalType, DataType targetType) {
|
||||
if (originalType.isArrayType() && targetType.isArrayType()) {
|
||||
return check(((ArrayType) originalType).getItemType(), ((ArrayType) targetType).getItemType());
|
||||
} else if (originalType.isAggStateType() && targetType.isAggStateType()) {
|
||||
return AggStateType.canCastTo(((AggStateType) originalType), ((AggStateType) targetType));
|
||||
} else if (originalType.isMapType()) {
|
||||
// TODO support map cast check when we support map
|
||||
return false;
|
||||
|
||||
@ -67,13 +67,6 @@ public class AggStateType extends DataType {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* check the left agg state type can be cast to the right.
|
||||
*/
|
||||
public static boolean canCastTo(AggStateType lhs, AggStateType rhs) {
|
||||
throw new UnsupportedOperationException("currently cast for agg_state type is unsupported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type toCatalogDataType() {
|
||||
List<Type> types = subTypes.stream().map(t -> t.toCatalogDataType()).collect(Collectors.toList());
|
||||
|
||||
@ -615,7 +615,7 @@ public class SessionVariable implements Serializable, Writable {
|
||||
public boolean extractWideRangeExpr = true;
|
||||
|
||||
@VariableMgr.VarAttr(name = ENABLE_NEREIDS_DML)
|
||||
public boolean enableNereidsDML = true;
|
||||
public boolean enableNereidsDML = false;
|
||||
|
||||
@VariableMgr.VarAttr(name = ENABLE_VECTORIZED_ENGINE, expType = ExperimentalType.EXPERIMENTAL_ONLINE)
|
||||
public boolean enableVectorizedEngine = true;
|
||||
|
||||
Reference in New Issue
Block a user