diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc index 5df59a3488d1..ab420c948244 100644 --- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc +++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc @@ -275,16 +275,6 @@ bool SubstraitToVeloxPlanValidator::validateCast( core::TypedExprPtr input = exprConverter_->toVeloxExpr(castExpr.input(), inputType); // Casting from some types is not supported. See CastExpr::applyCast. - if (input->type()->isDate()) { - if (toType->kind() == TypeKind::TIMESTAMP) { - LOG_VALIDATION_MSG("Casting from DATE to TIMESTAMP is not supported."); - return false; - } - if (toType->kind() != TypeKind::VARCHAR) { - LOG_VALIDATION_MSG("Casting from DATE to " + toType->toString() + " is not supported."); - return false; - } - } switch (input->type()->kind()) { case TypeKind::ARRAY: case TypeKind::MAP: