Skip to content

Commit

Permalink
remove date type check
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoliversun committed Mar 27, 2024
1 parent 9725971 commit 41a10b5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 41a10b5

Please sign in to comment.